@thatfriendlyasiandev/simple-api-creator
v1.0.6
Published
express with databases preinstalled with one package
Downloads
1
Maintainers
Readme
simple-api-creator
Express But More simple
Installation
Install simple-api-with npm
npm install @thatfriendlyasiandev/simple-api-creator
Usage/Examples
start a simple server
var ApiBasePlate = require('@thatfriendlyasiandev/simple-api-creator')
var api = new ApiBasePlate() // add options here default is none.
api.listen(process.env.port|| 3000)
Usage/Examples
start a simple server with api end points
var ApiBasePlate = require('@thatfriendlyasiandev/simple-api-creator')
var api = new ApiBasePlate() // add options here default is none.
api.listen(process.env.port|| 3000)
// name array
var names = ['bloody','owen','Jake','Dababy']
var lastname = ['mary','wilson','Byo','BabyDa']
api.get('/', (req, res) => {
res.send('Hello world')
})
// any means if any one goes to this endpoint using any type of request this will work
api.any('/names', (req, res) => {
res.json(name: names)
})
api.get('/getlastnames', (req, res) => {
res.json(lastname:lastname)
})
License
Features
- everything express had but with databases and more..
Installation
Install simple-api-with npm
npm install @thatfriendlyasiandev/simple-api-creator
Usage/Examples
start a simple server
var ApiBasePlate = require('@thatfriendlyasiandev/simple-api-creator')
var api = new ApiBasePlate() // add options here default is none.
api.listen(process.env.port|| 3000)
api.get('/', (req, res) => {
res.send('Hello world')
})
License
Features
- everything express had but with databases and more..