Build Restful CRUD API for a simple application using Nodejs, Sequelize, and MySQL
-
Nodejs - 9.8.x
-
Mysql - 5.x.x
1. Clone the application
git clone https://github.com/sean3z/nodejs-hero-api-example.git
2. Create DATABASE_URL environment variable
export DATABASE_URL=mysql://user:pass@localhost/heroes
3. Install Node Dependencies
npm i
4. Run the app
node app.js
The app will start running at http://localhost:8000
The app defines following CRUD APIs.
GET /heroes
You can test them using postman or any other rest client.
You can find more information on my blog post -