- By default all routes are avaible at "/".
- go to routes.js
- insert your route =>
routes.get('/myRoute', MyRouteFunction)
- you can use all types of routes ( get, post, delete, put,...)
To connect API to the database u need to create .env file that will contain informations to connect.
- rename .env-sample to .env
- insert your own data for connection
- You need to import db from database.js
import db from "./database"
- To run query use db.query(sql, callback)
db.query("SELECT * FROM users", (err, result, fields) => ... )
made from: [email protected]:vmasto/express-babel.git