Labyrinth is a web API to navigate through a maze.
Install typescript
and tslint
globally, if you haven't aready.
npm install -g typescript tslint
Local dependencies:
npm install
Compile TypeScript to JavaScript.
tsc
Executing this in the application's root folder will apply the settings from tsconfig.json
.
Run the application.
node dist/app.js
npm test
npm install
to get the depencencies.Add the following part to the available site in apache to route requests.
ProxyPass /labyrinth http://localhost:8085 ProxyPassReverse /labyrinth http://localhost:8085
This routing is purely internal. Then after each change reload apache to let the changes take effect.
service apache2 reload
Create the following /etc/systemd/system/labyrinth.service.
[Unit] Description=A good description [Service] PIDFile=/tmp/labyrinth.pid User=www-data Group=www-data Restart=always KillSignal=SIGQUIT WorkingDirectory=/var/www/labyrinth/ ExecStart=/usr/bin/node /var/www/labyrinth/app.js [Install] WantedBy=multi-user.target
After each change run
systemctl enable labyrinth.service
You can start/stop/show status with
systemctl start/stop/status labyrinth.service