opt-cc/README.md

69 lines
2.3 KiB
Markdown
Raw Normal View History

2017-07-09 17:08:32 +02:00
# Operation Pandora Trigger Commandcenter
2018-02-16 16:13:33 +01:00
A [MEAN Application](http://mean.io/) created for [operation-pandora.com](https://www.operation-pandora.com) Arma3 Community
2017-07-09 17:08:32 +02:00
## Installation
2018-02-16 15:58:49 +01:00
All steps described here are working with a Debian based Linux system
### Setup required 3rd Party Software
2018-02-16 16:26:40 +01:00
#### Setup for Development
2017-10-29 17:36:55 +01:00
Run the installation script located in the docs folder:
2018-02-25 16:43:46 +01:00
./docs/opt-cc-environment/3rd-party-install.sh
2017-10-29 17:36:55 +01:00
It installs NPM, Node and MongoDB on latest versions.
In addition, it sets up the mongo deamon to start up automatically with the system.
2018-02-16 16:26:40 +01:00
#### Setup for Production
2018-02-16 15:58:49 +01:00
2018-02-25 17:30:13 +01:00
**NOTE:** It his highly recommended **not** to run the following steps as _root_ user!
2017-10-29 17:36:55 +01:00
2018-02-16 15:58:49 +01:00
For production setup run the script, described in _Setup for development_, adding the parameter `prod`
2017-10-29 17:36:55 +01:00
./docs/opt-cc-environment/3rd-party-install.sh prod
2018-02-16 16:13:33 +01:00
This adds the [`pm2` process manager](http://pm2.keymetrics.io/) to be installed and start the _opt-cc_ server as `pm2` process.
2018-02-25 17:30:13 +01:00
Run the `sudo` command printed as last output to configure the `pm2` process for automatic start on the system.
2018-02-03 12:45:55 +01:00
2018-02-16 15:58:49 +01:00
## Development
2018-02-03 12:45:55 +01:00
2018-02-16 16:26:40 +01:00
### Run and Modify Application
**NOTE:** Do not use the execution described here in any production environment! It will make the running application highly vulnerable.
2018-02-16 15:58:49 +01:00
Before triggering the environment execution run
npm install
inside the main folder, to process all needed npm package installations for the program execution.
To compile the Angular code and afterwards start the Express server with `nodemon` for development purpose run
2018-02-03 12:45:55 +01:00
npm run dev
2018-02-03 12:45:55 +01:00
2018-02-16 15:58:49 +01:00
Any changes on `api` code will trigger an automatic restart of the Express server.
Changes on `static` code can be submitted with
npm run deploy-static
The page must be reloaded after this build step is finished, in order to make changes visible.
2018-02-16 16:26:40 +01:00
## Run Tests
_TODO_
2018-02-16 15:58:49 +01:00
## License Information
### Express API (`/api`)
published under [CC BY-SA 4.0 License](https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt) \
Main concept for API Server, pagination and MongoDB usage by [Prof. Dr.-Ing. Johannes Konert](https://prof.beuth-hochschule.de/konert/) \
2018-02-03 12:45:55 +01:00
All endpoints, signature image builder and Arma3 RPT-Log parsing by [Florian Hartwich](https://de.linkedin.com/in/florian-hartwich-b67b02125)
### Angular 5 Frontend (`/static`)
published under [MIT License](https://opensource.org/licenses/MIT)