@thatfriendlyasiandev/simple-api-creator

1.0.6 • Public • Published

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

MIT

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

MIT

Features

  • everything express had but with databases and more..

Authors

Package Sidebar

Install

npm i @thatfriendlyasiandev/simple-api-creator

Weekly Downloads

0

Version

1.0.6

License

ISC

Unpacked Size

4.79 kB

Total Files

4

Last publish

Collaborators

  • thatfriendlyasiandev