- My goal was to create a good strong-typed backend structure and to learn MySQL.
- I tested the endpoints with a http client (Insomnia).
- The server is a class and it's initialization is run sequencially in the constructor : Example code.
- The database and server run with properties only found in environment variables: Example code.
- The project runs with flags for dev and production environments. Example code
- Some folders feature an index file for better readability of import statements: Example code.
- Create a frontend to better show this project.
- Improve the overall structure of files for better quality of code and code readability.
Please remember to install the dependecies before trying to run the project npm i
In the project directory, you can run:
Executes node on the index.js
file.
Starts the server on production mode and uses real configuration to connect to production database and use the server port.
Starts the server using local configuration to connect to a local database with mock data.
The same as the previous two scripts but using nodemon
instead of node
.
Starts the server using production configuration and sets the mode=force
flag. This is so the server can create mock data to populate it's first-ever run.