Find all about this project on Dossier_projet.pdf
Create a Postgresql database named bookworm.
Install Sqitch
For Debian
sudo apt-get install sqitch libdbd-pg-perl postgresql-client libdbd-sqlite3-perl sqlite3
Create a sqitch.conf
file in the root folder (copy paste sqitch.conf.example
)
In terminal (in root)
sqitch deploy
Then
sqitch verify
Finally, run the seeding script (in root)
psql -U spedata -d bookworm -f docs/seeding_bookworm.sql
Install all the dependencies
npm install
Create a .env
file in the root (check .env.example
)
Run dev script
npm run dev
Propose the base of an app architecture for an API REST with CRUD (Create, Read, Update, Delete) routes.
This app implements various strong and usefull tools to help :
- Back developer to build the API
- Front deveoper to use the API
To keep clean and beautiful code, this app propose some NPMs (Node Package Module) in dev dependencies
- ESLlint file that extends the airbnb config which is one of the most popular
- Prettier file to formate the code
- EditorConfig file to help to maintain consistent coding rules across various IDE (integrated development environment)
To have better logs in console and keep some logs saved in log files
- debug provides better console logs and allow to toggle the logs for differents parts of the modules
- bunyan allow to save some logs in JSON
To validate the data format
- joi allow to describe data in schemas, and validate the compliance of the data sent.
2 SQL scripts are provided to create an example database which works with this base app
create_tables_example.sql
for the DDL (Data Definition Language)seeding_example.sql
for the DML (Data Manipulation Language)
pug homepage with link to doc