@srvr/srvr

3.1.3 • Public • Published

srvr

Build Status Version License

A simple, component-based framework for building Node.js API's quickly.

Demo

srvr demo

Example

A route inside of srvr can be as simple as:

module.exports = {
  path: '/', // path to this route
  async handler(request, reply) {
    // here you have access to fastify's request and reply
    // you can use reply.send to respond to the request
    // alternatively you may return json from the function
    return {
      hello: 'world',
    };
  },
};

Documentation

Complete documentation is coming soon!

Contribute

  1. Clone the repository
  2. Install dependencies
npm install
  1. Link the package and run babel
npm link
npm run dev
  1. Connect the package to your application (new terminal)
cd ./path/to/your/app
npm link @srvr/srvr
  1. Start your app's server
npm run dev

Readme

Keywords

Package Sidebar

Install

npm i @srvr/srvr

Weekly Downloads

8

Version

3.1.3

License

ISC

Unpacked Size

11.6 kB

Total Files

8

Last publish

Collaborators

  • nahtnam