All Projects → raghavgarg1257 → nodejs-mysql-boilerplate

raghavgarg1257 / nodejs-mysql-boilerplate

Licence: other
A modular structured app to start you next nodejs project.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nodejs-mysql-boilerplate

typescript-api-starter
🔰 Starter for Node.js express API in Typescript 🚀
Stars: ✭ 72 (+300%)
Mutual labels:  knexjs
bookshelf-advanced-serialization
Plugin for Bookshelf.js supporting advanced serialization behavior
Stars: ✭ 17 (-5.56%)
Mutual labels:  bookshelf
learn-ruby-and-cs
Books and other resources for learning Ruby and computer science.
Stars: ✭ 25 (+38.89%)
Mutual labels:  bookshelf
knex-dynamic-connection
Adds support for dynamically returning connection config for knex queries. Helpful when you want to deal with write/read replicas
Stars: ✭ 27 (+50%)
Mutual labels:  knexjs
lit
Literature for the self-taught AI practitioner! 📚
Stars: ✭ 199 (+1005.56%)
Mutual labels:  bookshelf
BookReader
📕 "任阅" 网络小说阅读器,3D翻页效果、txt/pdf/epub书籍阅读、Wifi传书~
Stars: ✭ 6,113 (+33861.11%)
Mutual labels:  bookshelf
objection-authorize
isomorphic, "magical" authorization integration with Objection.js 🎉
Stars: ✭ 71 (+294.44%)
Mutual labels:  knexjs
bookshelf-secure-password
A Bookshelf.js plugin for handling secure passwords
Stars: ✭ 24 (+33.33%)
Mutual labels:  bookshelf
ds
👨‍🔬 In Russian: Обновляемая структурированная подборка бесплатных ресурсов по тематикам Data Science: курсы, книги, открытые данные, блоги и готовые решения.
Stars: ✭ 102 (+466.67%)
Mutual labels:  bookshelf
Openbooks
An online reopository to share books. Created in the loving memory of the internet's own boy Aaron swartz, on his birthday.
Stars: ✭ 45 (+150%)
Mutual labels:  bookshelf
greldal
A micro-framework for bidirectional mapping between relational datastores and GraphQL APIs (powered by Node.js)
Stars: ✭ 58 (+222.22%)
Mutual labels:  knexjs
sqlike
Golang Sequel ORM that supports Enum, JSON, Spatial, and many more
Stars: ✭ 18 (+0%)
Mutual labels:  sql-orm
bookshelf-json-columns
Parse JSON columns with Bookshelf.js
Stars: ✭ 64 (+255.56%)
Mutual labels:  bookshelf
axe-api
The fastest way to create a simple Rest API, by defining database models and relations.
Stars: ✭ 61 (+238.89%)
Mutual labels:  knexjs
Bookshelf
A simple Node.js ORM for PostgreSQL, MySQL and SQLite3 built on top of Knex.js
Stars: ✭ 6,252 (+34633.33%)
Mutual labels:  bookshelf
Proffy
👥 Plataforma de estudos online, onde é possível conectar alunos com professores. Este é um projeto que foi desenvolvido durante a Next Level Week #2 da @Rocketseat, durante os dias 3 à 7 de agosto de 2020.
Stars: ✭ 12 (-33.33%)
Mutual labels:  knexjs
jsonapi-mapper
JSON API-Compliant Serialization for your Node ORM
Stars: ✭ 41 (+127.78%)
Mutual labels:  bookshelf
bookshelf
Hanami "Getting Started" project
Stars: ✭ 20 (+11.11%)
Mutual labels:  bookshelf
graphql-example
GraphQL Sample Project
Stars: ✭ 32 (+77.78%)
Mutual labels:  knexjs
my-bookshelf
Collection of books/papers that I've read/I'm going to read/I would remember that they exist/It is unlikely that I'll read/I'll never read.
Stars: ✭ 49 (+172.22%)
Mutual labels:  bookshelf

NodeJS MySQL Boilerplate

This app defines a very neat and modular structure to start you next nodejs project.

Using: MySQL, NodeJS, Express, Bookshelf, Knex, Json Web Token(JWT)

Using ES6, with Babel (http://babeljs.io/)

Pre-requisites:

  1. NodeJS (https://nodejs.org/en/)
  2. Globally installed nodemon (https://nodemon.io/)

Steps to run:

git clone [email protected]:raghavgarg1257/nodejs-mysql-boilerplate.git
cd nodejs-mysql-boilerplate
cp env.example .env
nano .env #now edit credentials according to your machine (mandatory for db connection)
npm install

Now to migrate Database

npm install knex -g

# To create the tables
npm run migrate-up

# To drop the tables
npm run migrate-down

Now to start the server

npm start

The app will be started on the mentioned port which will be printed in the console upon starting the server like: http://localhost:8080.

Available routes

-> GET / : (open*) Just show the message
-> POST / : (open*) Another message.

-> GET /users : (open*) Show all the users in the app
-> POST /users [name, phone, email] : (open*) Add new user (generate jwt token)

-> GET /users:id : (protected*) Get the user info by id
-> PUT /users:id [name, phone, email](optional) : (protected*) Update the user info by id
-> DELETE /users:id : (protected*) Delete the user by id

-> GET /users:id/address : (protected*) Show all the address got the user by id
-> POST /users:id/address [line1, line2, state, pincode, landmark] : (protected*) Add new address to the user by id

# guide
open* - means route is un-protected, anyone can access the route
protected* - means a valid jwt token has to be used to access the route in header "Authorization" with value "Bearer {token}"
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].