- Docker installed
- A terminal tool based on
bash
orzsh
./dev backend
to start andenter
the container of development
- Next commands are only available in the container
yarn install
to install dependencesyarn init-db
to initialize the database, and to import some mock daatayarn test
to run testsyarn dev
to start a development server which implemented by nodemonyarn start
to start a non-reload server (for staging)
- Dev-site:
http://localhost:3000/
- API-docs:
http://localhost:3000/docs/
./dev down
: this command can drop all the development containers, don't worry, all data are persistent- If you try to prune all the data and code, just
delete
the directory of this project.
- Docker installed
- A terminal tool based on
bash
orzsh
- Local port of 3000 is free (able to change in the
docker/docker-compose.yml
)
./dev up-staging
, (wating for all services started) then the service will served on http://localhost:3000
Using ./dev down-staging
to remove containers.
./dev build
Here is a comprehensive description of this program
- [√] The API should follow a typical RESTful API design pattern.
- [√] The data should be saved in the DB.
- [√] Provide proper unit test.
- [√] Provide proper API document.
-
[√] Use Node.js and any framework.
-
[√] Use any DB. NoSQL DB is preferred.
-
Addition: Docker and shell