@srvr/srvr
v3.1.3
Published
srvr
Downloads
44
Readme
A simple, component-based framework for building Node.js API's quickly.
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
- Clone the repository
- Install dependencies
npm install
- Link the package and run babel
npm link
npm run dev
- Connect the package to your application (new terminal)
cd ./path/to/your/app
npm link @srvr/srvr
- Start your app's server
npm run dev