⚡
light
  • light
  • guides
    • getting started
    • server vs serverless
    • routes
    • models
    • factories
    • routing
    • plugins
    • middleware
    • query
    • params
    • global
    • error handling
    • hot module reloading (TODO)
    • databases (TODO)
      • mongoose
      • objection/knex
    • testing (TODO)
      • ava
      • jest
    • deployments (TODO)
      • runkit
      • aws
      • now
      • heroku
      • server
      • google cloud
      • azure
      • netlify
    • misc (TODO)
      • apollo/graphql
  • api
    • server({ routes, opts }): object
    • params(path, url): Promise<object>
    • boom
      • Coming soon
    • micro
      • Coming soon
      • Coming soon
      • Coming soon
      • Coming soon
      • Coming soon
      • Coming soon
Powered by GitBook
On this page
  • Introduction
  • Usage

Was this helpful?

  1. guides
  2. deployments (TODO)

runkit

Previousdeployments (TODO)Nextaws

Last updated 5 years ago

Was this helpful?

Introduction

RunKit is a fun and dynamic website which lets you prototype your applications. With their support for and light's flexibility, you can easily run the framework on RunKit.

Usage

Simply create a new notebook and add the following code.

const { route } = require('light');

process.env.LIGHT_ENV = 'runkit';

const { handler } = route();

module.exports = handler(() => {
  return {
    hello: 'world',
  };
});

Then click the "run" button. It should print Object {endpoint: function()}. If you get that, then you are all set. Press the little "endpoint" button underneath the notebook title to see your project live.

A demo of this functionality can be seen on the .

endpoints
home page