Just simple Fastify fullstack skeleton.
- Auto cache and can be configured
- Routes with schema validation
- Error handler for 4xx and 5xx
- Asynchronous designed
- HTML auto minifed
- Fastify v3
- Mongoose 5
- ETA Template Engine
- Download this source code.
- Extact and go to current directory then run
npm install
- Edit the
config.js
- Run
node server.js
- Done.
Then open your browser and go to
- http://localhost:3000
- http://localhost:3000/api/routes
For MongoDB Test
- POST http://localhost:3000/db/add-contact
- POST http://localhost:3000/db/edit-contact
- GET http://localhost:3000/db/get-contact/:id
- GET http://localhost:3000/db/list-contact
- GET http://localhost:3000/db/search-contact?q=<name or address>
If you want to play unit test
npm test