Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hugojosefson/getsandbox-express

A getsandbox.com to express adapter, and sandbox cli.
https://github.com/hugojosefson/getsandbox-express

Last synced: 29 days ago
JSON representation

A getsandbox.com to express adapter, and sandbox cli.

Awesome Lists containing this project

README

        

# @hugojosefson/getsandbox-express
A getsandbox.com to express adapter

## Usage

### as command-line tool, without installing

```bash
npx @hugojosefson/getsandbox-express []
```

Alternatively, if you want to install it globally:

```bash
npm install -g @hugojosefson/getsandbox-express
sandbox []
```

Default port is `8080`.

### as Node.js module

```js
const sandbox = require('@hugojosefson/getsandbox-express')
const express = require('express')

const app = express()
sandbox.loadSandbox(app, __dirname + '/mysandbox/main.js')

const port = 8080
app.listen(port, () => {
console.log(`Sandbox listening on port ${port}.`)
})
```