description |
---|
The server in serverless |
- node 6+
npm install @sunny-server/core
Create a file called index.js
module.exports = {
register: (server, options) => {
server.route({
method: "GET",
path: "/",
handler: (request, reply) => {
reply("Everything is sunny!");
}
});
}
}
To start the server
npx sunny start --plugins=index.js
Goto localhost:3000 and everything should be sunny!