DISCLAIMER: The api is still in active development and is by no means polished yet!
Straight forward, simple backend for basic needs of the smirky-games-website. Feel free to use any code you like from this project and to ask any question you like in the issues section :) We use Deno as runtime, pm2 as process manager on the server and nginx as reverse proxy.
When using a docker container as development environment, attaching a debugger to the server is not possible (to my knowlegde).
In order to start the local docker container for development, you will need to have docker and docker-compose installed.
Run sudo docker-compose up -d
to start
- the backend on port 8001 and
- a mongodb server on port 27017.
Press F5
to run the server either with the profile Deno debug
or Deno hot reload
.
With debug you can then set breakpoints and debug normally.
With hot reload you can instantly test changes to your code.
We use Docker for building the api backend and deploying to our server.
- Install docker and docker-compose on your deployment/development machine
- Import the remote.dockercontext via
docker context import remote.dockercontext
and modify DOCKER ENDPOINT (can be inspoected by usingdocker context ls
) by runningdocker context update ...
(see documentation for how to change a context). - You need to have a ssh certificate installed and used by the ssh-agent in order for the ssh connection to succeed.
- Install docker and docker-compose on your server
Simply run the deploy.sh.
MIT License © 2021 Antonio Dell'Annunziata