NOTICE: Since light is a work in progress, breaking changes will be made every MINOR patch until 2.0

light.js

a

serverless

framework

CircleCI  NPM  Downloads  Stars  Coveralls

as simple as

light dev

$ light dev
> listening on port 3000
> GET        /
> <          200 17b
const light = require('light');

module.exports = light({
  path: '/',
  async handler(req, res) {
    return {
      hello: 'world',
    };
  },
});

reload without actually reloading

dont waste your time waiting for your server to restart

$ light dev
> listening on port 3000
> routes/index.js changed
hot-swapping file
> done [1 ms]
vs
$ node express.js
> listening on port 3000
> routes/index.js changed
restarting server
reimporting all routes
reconnecting to database
reconnecting to cache
recompiling templates
> listening on port 3000
> done [1-5 s]

write once

deploy anywhere

const light = require('light');



module.exports = light({
  path: '/',
  async handler(req, res) {
    return {
      hello: 'world',
    };
  },
});