/express-generator-api

this repository just for learn

Primary LanguageJavaScript

Basic CRUD Restful API with express-generator

Express Logo

this api does a simple CRUD operations on a single table mysql Database .

this is build on top off fastest validator and sequelize ORM

link to express-generator!

the api use different HTTP methods ( GET, POST, PUT, and DELETE )

to make this work correctly you need to :

  • you need to have node js
  • you need to have mysql installed in your machine ( install xampp if you don't have )
  • create a new empty database and call it 'test'

Clone this repository:

$ git clone https://github.com/juangsabit/express-generator-api.git

Install dependencies:

$ npm install

Migrate using sequelize:

$ npx sequelize db:migrate

Listening and serving HTTP on :3000

  • GET /products --> get all products
  • GET /products/:id --> get single product
  • POST /products --> create new product
  • PUT /products --> update product
  • DELETE /products/:id --> delete product

Thank you..~