Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.


Endpoint with Express

node v4.9.1
version: 1.0.0
var express = require("express"); function runkitExpress(anExport) { var mount = express(); var app = express(); // "mount" is our root app, and it mounts "app" at your notebook path // which is available in the RUNKIT_MOUNT_PATH environment variable mount.use(process.env.RUNKIT_MOUNT_PATH || "", app); if (anExport) { anExport.endpoint = mount; } // overwrite .listen since it is not needed app.listen = function(){} // return the express instance for use by the caller return app; } module.exports = runkitExpress
Use this helper to quickly return a RunKit Endpoint compatible express app, in place of calling express directly. Here's an example use: https://runkit.com/runkit/express-endpoint-demo.


  • posted 4 years ago by araid-en10
    Yup yo suck
  • posted 4 years ago by romeo27091985
    { "error": "invalid_server", "message": "The requested document does not export an 'endpoint' function. Read more about endpoint: https://runkit.com/docs/endpoint" }
  • posted 3 years ago by bradles
  • posted 3 years ago by kraze-ninja
    module.exports = runkitExpress
  • posted 2 years ago by randomstand
  • posted a year ago by 5efd616b2111c6001af08cce
    I just sat down to eat after a long day.
  • posted a year ago by ronald1113
    npm login --registry=https://npm.pkg.github.com/
  • posted 10 months ago by jettrey13
    EndpEndpont 16057282075 & 16058463190

sign in to comment