Skip to content

begandroide/MSQNodeApi

Repository files navigation

Mysql nodejs fastify Api

Inicialización 💣

Lo primero es correr las migraciones, para ello debemos hacer:

bg$bg ~\ npm run knex:migrate:latest

Luego debemos correr el archivo seeder para añadir al usuario admin

bg$bg ~\ npm run knex:migrate:seed

Como crear una nueva migración

bg$bg ~\ npm run knex:migrate:make <nombre_migración>

MSQNodeApi

Project to learn Node backend connection with Mysql using Fastify and Knex; also is available a Swagger UI to list endpoints.

Mysql + Node + Fastify + Swagger

dependencies contributors node

Main Goal: 🏁

Develop a RestfulApi written in NodeJs as Bussines Service Layer, handle session and authentication between user and API, also user Swagger as API UI. Play with Migrations.

Technology used 💠

  • Fastify: Fastify is a web framework highly focused on providing the best developer experience with the least overhead and a powerful plugin architecture. It is inspired by Hapi and Express and as far as we know, it is one of the fastest web frameworks in town.

  • Fastify-Swagger: Swagger documentation generator for Fastify. It uses the schemas you declare in your routes to generate a swagger compliant doc.

  • Knex: A SQL query builder that is flexible, portable, and fun to use! A batteries-included, multi-dialect (MSSQL, MySQL, PostgreSQL, SQLite3, Oracle (including Oracle Wallet Authentication)) query builder for Node.js.

  • dotenv: A zero-dependency module that loads environment variables from a .env file into process.env.

  • mssql: Microsoft SQL Server client for Node.js

  • nodemon: A tool that helps develop node.js based applications by automatically restarting the node application when file changes in the directory are detected.

  • objection: Objection.js is an ORM for Node.js that aims to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine while still making the common stuff easy and enjoyable.

About

RestfulApi Nodejs + Fastify + MySql + Swagger

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages