tracman-server/README.md

117 lines
5.3 KiB
Markdown
Raw Permalink Normal View History

2018-01-21 17:05:12 -07:00
# <img align="left" src="/static/img/icon/by/48.png" alt="T" title="The Tracman Logo">Tracman
2018-03-05 20:38:22 -07:00
###### v 0.9.0
2016-05-05 16:06:45 -06:00
2020-06-22 20:08:19 -06:00
## This project is deprecated. Since Google increased the cost of their maps API, it no longer made financial sense to keep it running. I might revive or remix the project in the future.
2017-04-25 18:22:18 -06:00
node.js application to display a sharable map with user's location.
2016-04-27 22:02:13 -06:00
2018-03-04 17:59:32 -07:00
[![Travis Build Status](https://travis-ci.org/Tracman-org/Server.svg?branch=develop)](https://travis-ci.org/Tracman-org/Server)
2018-03-04 19:31:38 -07:00
[![Coverage Status](https://coveralls.io/repos/github/Tracman-org/Server/badge.svg?branch=master)](https://coveralls.io/github/Tracman-org/Server?branch=master)
2017-12-12 17:40:07 -07:00
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
2018-02-24 13:41:55 -07:00
2016-04-27 22:02:13 -06:00
## Installation
2017-03-18 13:53:48 -06:00
2017-05-02 03:57:10 -06:00
On unix-based systems:
2016-05-05 16:06:45 -06:00
```sh
2017-12-13 12:54:14 -07:00
git clone https://github.com/Tracman-org/Server.git tracman-server &&\
cd tracman-server &&\
npm install
2016-05-05 16:06:45 -06:00
```
2017-12-13 11:40:46 -07:00
You will need to set up a configuration file at `config/env/env.js`. Use `config/env/sample.js` for an example. You can get API keys at the [google developer's console](https://console.developers.google.com/apis/credentials). You will need to set up approved hosts and auth callbacks. There is more information in [their documentation](https://support.google.com/googleapi/answer/6158857?hl=en).
2017-04-26 21:13:14 -06:00
2017-12-13 11:40:46 -07:00
A good method is to simply copy the sample configuration and point `config/env/env.js` to the new version:
2017-04-26 21:13:14 -06:00
```sh
2017-06-23 09:30:05 -06:00
cp config/env/sample.js config/env/local-config.js
2018-03-05 20:46:25 -07:00
echo "module.exports = require('./local-config.js')" > config/env/env.js
2017-04-26 21:13:14 -06:00
```
2017-12-13 11:40:46 -07:00
Then edit `config/env/local-config.js` to match your local environment.
2017-03-18 13:58:57 -06:00
2017-04-28 13:41:09 -06:00
2017-04-26 21:26:46 -06:00
## Usage
2017-12-13 11:40:46 -07:00
Run Tracman with npm:
2016-04-27 22:02:13 -06:00
```sh
npm run build && npm start
2016-05-12 21:10:34 -06:00
```
2017-04-26 21:26:46 -06:00
...or with [nodemon](https://nodemon.io/):
2017-03-18 13:58:57 -06:00
```sh
2017-05-02 03:57:10 -06:00
npm run nodemon
2017-03-18 13:58:57 -06:00
```
2018-03-08 20:30:44 -07:00
Nodemon will automatically rebuild and restart the app when you make changes.
2017-04-26 21:26:46 -06:00
2017-04-28 13:41:09 -06:00
2017-03-15 04:30:03 -06:00
## Contributing
2017-12-13 11:40:46 -07:00
Tracman will be updated according to [this branching model](http://nvie.com/posts/a-successful-git-branching-model)... more or less. If you know anything about programming Android, [the Tracman android app](https://github.com/Tracman-org/Android) is more desperate for help.
2017-03-15 04:30:03 -06:00
2017-04-28 13:41:09 -06:00
2016-06-14 15:40:09 -06:00
## Changelog
2016-05-12 21:10:34 -06:00
2017-04-28 13:41:09 -06:00
[view full changelog](CHANGELOG.md)
2018-08-10 14:56:42 -06:00
###### v0.9.x
* Removed coinhive
2018-08-13 20:12:00 -06:00
* Fixed CSP rules
* Improved debugging output
* Tried to fix scrollwheel
2018-08-14 16:48:04 -06:00
* Fixed security audited npm packages
2018-03-05 20:38:22 -07:00
* [#121](https://github.com/Tracman-org/Server/issues/121) Fixed various security holes
* [#68](https://github.com/Tracman-org/Server/issues/68) Added tests, mostly for authentication
* [#120](https://github.com/Tracman-org/Server/issues/120) Split config/routes/settings.js into two files
* Removed express validator and replaced with homegrown function
* Fixed showing welcome message on every login
2018-03-05 20:38:22 -07:00
* Removed naked domains
* Patched [CVE-2017-16117](https://github.com/dodo/node-slug/issues/82) on [node-slug](https://github.com/dodo/node-slug)
2018-03-05 20:38:22 -07:00
###### v0.8.x
2018-01-22 15:57:41 -07:00
* Hotfixed service worker bugs
* Added check to ensure only the newest location is sent
2018-01-22 15:05:02 -07:00
* Removed buggy login/-out redirects
2018-01-21 16:46:37 -07:00
* [#111](https://github.com/Tracman-org/Server/issues/111) Implemented service worker
* [#116](https://github.com/Tracman-org/Server/issues/116) Switched promises for async/await
* [#64](https://github.com/Tracman-org/Server/issues/64) Started using promises in model methods
* [#63](https://github.com/Tracman-org/Server/issues/63) Disconnect inactive clients
2017-12-12 17:40:07 -07:00
* [#110](https://github.com/Tracman-org/Server/issues/110) Implemented [StandardJS](https://standardjs.com/)
2017-12-13 11:13:59 -07:00
* Removed emojis
2017-12-13 11:40:46 -07:00
* [#113](https://github.com/Tracman-org/Server/issues/113) [#114](https://github.com/Tracman-org/Server/issues/114) Switched to useMongoClient
* [#67](https://github.com/Tracman-org/Server/issues/67) Fixed invisible marker in demo
2017-12-13 12:52:01 -07:00
* Shortened if statements and long lines
2017-12-12 17:40:07 -07:00
2018-01-21 16:46:37 -07:00
#### v0.7.x
2017-11-05 11:08:39 -07:00
* Fixed altitude sign
2017-09-27 20:24:56 -06:00
* Added coinhive
* Added HTML5 shiv
2017-09-25 21:33:26 -06:00
* Added support for browser geolocation
* Fixed streetview image bugs
* Added sourcemaps for debugging
* Fixed streetview bearing
* [#96](https://github.com/Tracman-org/Server/issues/96) Replaced panorama with static images
2017-09-16 16:17:44 -06:00
* [#96](https://github.com/Tracman-org/Server/issues/96) Continue to update panorama after creating element
2017-08-22 18:10:17 -06:00
* [#100](https://github.com/Tracman-org/Server/issues/100) Moved CSS out of webpack
* Fixed [#108](https://github.com/Tracman-org/Server/issues/108)
2017-08-20 16:29:40 -06:00
* Fixed bugs [#105](https://github.com/Tracman-org/Server/issues/105) and [#107](https://github.com/Tracman-org/Server/issues/107)
2017-07-21 06:09:46 -06:00
* [#89](https://github.com/Tracman-org/Server/issues/89) Can change marker color
2017-07-14 15:50:22 -06:00
* Fixed [#102](https://github.com/Tracman-org/Server/issues/102) issue creating account
2017-04-12 12:40:56 -06:00
## License
2017-04-28 13:41:09 -06:00
[view full license](LICENSE.md)
2017-04-12 12:40:56 -06:00
Tracman: GPS tracking service in node.js
2018-03-04 20:12:22 -07:00
Copyright © 2018 [Keith Irwin](https://www.keithirwin.us/)
2017-04-12 12:40:56 -06:00
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
2017-05-30 15:23:34 -06:00
You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/).