1.0.3 • Published 4 years ago

moonext v1.0.3

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

Moonext

Back-end framework for anything!


NPM - Click here

GITHUB - Click here


At the moment, the framework is under development, so it is not recommended for now to use it in commercial projects


Install:

$ npm install moonext

OR

$ yarn add moonext


Usage


Code example:
const Moonext = require("moonext")

Moonext.listen(3000, () => {
  console.log("Started on localhost:3000")
})

Method listen:

Started server on localhost. First argument is port, second argument callback, when server started (second argument is not obligatory)

Moonext.listen(3000) // http://localhost:3000

// OR

Moonext.listen(3000, () => {
  console.log("Started on localhost:3000")
})

Method add

Adds a function to be generated on localhost, takes two parameters: req and res

Moonext.add((req, res) => {
  req.end("Hello from node http!")
})