# Pointsight Pointsight is a centrailzed geolocatlized api aggreagtor. # To be done before feature lock - [X] Feature to report points - [ ] API usage tracking (MySQL done; influx done; limiting tbd) - [X] Proper error messages, on page crash loading failure, lost connection - [X] Shareable points, open by link - [X] Offline version - [X] Filter sidebar # Configuration This is the configuration with all it's defaults. ``` let jsonConfigGlobal = { fontAwesome: undefined, mapboxAccessToken: undefined, cookieSecret: undefined, mapquest: undefined, here: undefined, sentryDsn: undefined, database: { host: "127.0.0.1", user: "pointsight", password: "CHANGE_ME", database: "pointsight", customSettings: { wait_timout: 28800 } }, env: "PROD", maint: true, betaMode: false, port: 3000, adress: '127.0.0.1', taxonomyCacheInterval: 5, metrics: { influx: { enable: false, host: "127.0.0.1", database: "pointsight", user: "pointsight", password: "CHANGE_ME", }, writeMetricsToMySQL: true } } ``` # How to deploy 1. Make sure Node.js is installed 2. Clone repo 3. Run the `npm install` command 4. Create the `config/default.json` file with proper settings 1. Make sure `env` is set to `PROD` 2. Make sure `maint` is set to `false` 3. Make sure the database credentials are set 5. Start the server with `npm start`, this starts the server on port 3000 ## Troubleshooting **The map stays empty** Cause: The data cannot be loaded because the API key was not imported. Solution: Import the `b03f8aaf-1f32-4d9e-914a-9a50f904833d` into the `apikeys` table. After importing it you may use the apikey manager to change it's options. **The map is not being displayed** Cause: The maps tiles cannot be loaded as the API key is missing. Solution: Make sure the config contains the correct apikey. # For developers ## Adding a new module 1. Copy the example module folder 2. Change the `main.js` to your needs. 1. Update the modules meta data in the `getModuleMeta()` funcion 2. Make sure to use the right country for your module