Skip to content

REST Api training, I build a simple crud for architecting an effective and efficient API using fastify, it will achieve Speed, Documentation using swagger and Architecture and Sustainability.

License

Notifications You must be signed in to change notification settings

h3ct0rjs/fastify-potter-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

fastify-potter-api

REST Api training, I build a simple crud for architecting an effective and efficient API using fastify, it will achieve Speed, documentation using swagger and create the architecture and sustainability of the code base.

Install and Run

user@machine ~$ git clone https://github.com/h3ct0rjs/fastify-potter-api fastify_potter
user@machine ~$ cd fastify_potter
user@machine ~/fastify_potter/src$ cd src
user@machine ~/fastify_potter/src$ npm install 

you will need to seed the database using the populatedb.js script available in the data folder

user@machine ~/fastify_potter/src$node ./data/populatedb.js

then run in development mode :

user@machine ~/fastify_potter/src$ npm run dev 

you should be able to reach the api in http://localhost:9000/api/ check if this is it with the information endpoint http://localhost:9000/api/info

Endpoints(In Progress)

All the information is availible in http://localhost:9000/api/docs generated by the swagger fastify plugin.

ToDo

  • Create api benchmarks.
  • CI/CD Integration.
  • Add unit testing with mocha.
  • Add more data about the potter verse.

License

This was a quick and fast exercise to practice the Architecture and Sustainability of a rest API, there are multiple improvements that could be done. You can use this code to learn patterns or think in improvements.

MIT

About

REST Api training, I build a simple crud for architecting an effective and efficient API using fastify, it will achieve Speed, Documentation using swagger and Architecture and Sustainability.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published