• Stars
    star
    1,627
  • Rank 28,754 (Top 0.6 %)
  • Language
    Go
  • License
    ISC License
  • Created about 6 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Nodebook - Multi-Lang Web REPL + CLI Code runner

nodebook

Nodebook - Multi-Language REPL with Web UI + CLI code runner

Useful to practice algorithms and datastructures for coding interviews.

What is it?

Nodebook is an in-browser REPL supporting many programming languages. Code's on the left, Console's on the right. Click "Run" or press Ctrl+Enter or Cmd+Enter to run your code. Code is automatically persisted on the file system.

You can also use Nodebook directly on the command line, running your notebooks upon change.

nodebook

A notebook is a folder containing an {index|main}.{js,py,c,cpp,...} file. The homepage lists all of the available notebooks.

home

Supported environments

  • C11 (.c)
  • C++14 (.cpp)
  • C# (.cs)
  • Clojure (.clj)
  • Elixir (.ex)
  • Fsharp (.fs)
  • Go (.go)
  • Haskell (.hs)
  • Java (.java)
  • NodeJS (.js)
  • Lua (.lua)
  • OCaml (.ml)
  • PHP (.php)
  • Python 3 (.py)
  • R (.r, .R)
  • Ruby (.rb)
  • Rust (.rs) β€” Uses cargo run if Cargo.toml is present, and rustc otherwise
  • Swift (.swift)
  • TypeScript (.ts)

If --docker is set on the command line, each of these environments will run inside a specific docker container.

Otherwise, the local toolchains will be used.

Install from release

Head to Releases and download the binary built for your system (mac, linux).

Rename it to nodebook and place it in your path.

Install from source

Building requires go.

$ make deps
$ make install
# nodebook should be available under $GOPATH/bin/nodebook or $GOBIN/nodebook

Run with Web UI

# With dockerized toolchains
$ nodebook --docker path/to/notebooks

# With local toolchains
$ nodebook path/to/notebooks

Run on CLI (watch and run mode)

$ nodebook cli --docker path/to/notebooks
# Or
$ nodebook cli path/to/notebooks

Usage

Create a Notebook (Web UI)

Click on the + Notebook button on the Home page, then select the language of the notebook to be created.

Once on the notebook edition page, you can rename the notebook by clicking on it's name.

Notebooks are created in the directory specified by the parameter --notebooks.

Create a Notebook manually (WebUI, CLI)

In the directory where you want your notebooks to be stored, simply create a folder containing a file named {index|main}.{js,py,c,cpp,...}.

The notebook's name will be the name of the folder. The notebook language is determined automatically.

Command line options

  • --docker: Execute code in disposable docker containers instead of local system; defaults to false

Web UI only:

  • --bindaddress: IP address the http server should bind to; defaults to 127.0.0.1
  • --port: Port used by the application; defaults to 8000

Notebook environment

If your notebook dir contains a .env file, the corresponding environment will be set up during notebook execution.

Exemple .env:

HELLO=World!

More information about the expected file format here: https://github.com/motdotla/dotenv#rules

⚠️ A bit of warning ⚠️

Do not run the Web UI on a port open to public traffic! Doing so would allow remote code execution on your machine.

By default, the server binds to 127.0.0.1, which allows connection from the localhost only. You can override the bind address using --bindaddress, but do it only if you know what you're doing.

More Repositories

1

IdiomaticReact

Idiomatic React - Flux - REST app
JavaScript
327
star
2

upndown

HTML to Markdown javascript converter
JavaScript
275
star
3

bowser

⭐ Bowser - Dynamic Default Browser Switch for MacOS
Go
44
star
4

ember-cli-cal

Calendar component for ember-cli
JavaScript
43
star
5

Geiger

Tiny (<100 SLOC), no-dependencies Flux implementation with store synchronization (waitFor) and Dependency Injection features.
JavaScript
37
star
6

Pulpy

Juicy full featured web calendar
JavaScript
14
star
7

tax

CLI Task List Manager
Rust
14
star
8

Symfony-DynamicSubdomainBundle

Symfony2 Dynamic subdomain handler Bundle
PHP
13
star
9

ecs-typescript

Port of bytearena/ecs from Golang to TypeScript
TypeScript
11
star
10

imagejam.net

JavaScript
10
star
11

hackervid.io

Hacker video source code
PHP
7
star
12

ember-cli-cal-demoapp

Demo app for ember-cli-cal
JavaScript
5
star
13

realtime-reactive

Realtime reactive experimental data synchronization between a server and multiple clients
TypeScript
4
star
14

Symfony-AdminLTEBundle

PHP
3
star
15

docker-rust

Rust in a container
3
star
16

Symfony-BaseProject

A pre-configured project template using Symfony2, Less, Bootstrap3, FontAwesome, jQuery, Modernizr, CoffeeScript and RequireJS
PHP
2
star
17

PP-Theme-Dropplets

Dropplets theme for PP
CSS
2
star
18

baikal.codr.fr

The source code for http://baikal-server.com
PHP
2
star
19

BaikalModelBundle

PHP
2
star
20

co

PHP implementation of tj/co
PHP
2
star
21

Symfony-BootcampBundle

Symfony bundle boilerplate for easy PAAS integration.
PHP
2
star
22

scope

JS Oscilloscope for webaudio
TypeScript
1
star
23

void

Simplest webpack setup for dev + dist
JavaScript
1
star
24

car-model-prototype

Car model prototype repo (temporary)
Go
1
star
25

compose.js

JavaScript
1
star
26

PP-Theme-Medium

A Medium-Like theme for PP
CSS
1
star
27

BretzelDefense

JavaScript
1
star
28

BaikalDavServicesBundle

PHP
1
star
29

minifig

Lego minifig builder
CSS
1
star
30

phreak

PHP to ES6 abomination
PHP
1
star
31

youtube-graphql

JavaScript
1
star
32

palettes

Some palettes I ❀️.
1
star
33

audioviz

Hacking together a webgl audio viz
JavaScript
1
star
34

docker-compose-symfony3

docker-compose Symfony 3 + php7 fpm + mysql + nginx
PHP
1
star
35

webpack-frontend-startpack

Start pack for webpack frontend projects, based on Webpack with Babel and controlled by Gulp
JavaScript
1
star
36

ecs

C++ Entity Component System
C++
1
star
37

BaikalCore

1
star
38

rust-bmfont

Bitmap font parser for rustlang
Rust
1
star
39

taptapclap

Remote Clapping Apparatus
TypeScript
1
star
40

n-behaviour

Finite State Machine / Behaviour management for nodejs and the browser
JavaScript
1
star
41

Symfony-AutorouteBundle

Autoroute bundle for Symfony
PHP
1
star
42

PPSilex

Deliciously simple Markdown blog system, based on Silex.
PHP
1
star
43

airline

Land every request to it's destination. Works great with koa.
JavaScript
1
star