Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including enclave with all npm packages installed. Try it out:

var enclave = require("enclave")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

enclave v0.4.1

An API for compiling React applications with Webpack


An API for compiling React applications with Webpack and Babel.

##Getting Started:

$ mkdir my-new-app
$ cd my-new-app
$ npm init
$ npm i enclave --save

Create an entry point for your application:

$ mkdir src && touch src/Main.js

Write some code, if you're doing React, something like this should work:

/* src/Main.js */

import React from 'react';
import { render } from 'react-dom';

class App extends React.Component {
  render() {
    return (
          Welcome to my app!

// hook into the `enclave` id, which is provided by enclave.
render(<App />, document.getElementById('enclave'));

You then want to create a .enclaverc file to inform enclave on some build settings.

$ touch .enclaverc

Configure your enclaverc file:

/* .enclaverc */
  "entry": "src/App.js",
  "index": "src/index.html",
  "output": "./dist",
  "port": "3000"

Once you're ready to compile your code, run this awkward command in your terminal:

$ node node_modules/enclave/index.js

Then find your app at http://localhost:3000

If you don't specify a port in your .enclaverc file then your app will be served on port 8080.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free