ExpressOnline Express compiler, Online Express IDE, and online Express REPL.

Code Express, compile Express, run Express, and host your programs and apps online for free.

loading
Files
  • index.js
  • db.js
  • package.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
const express = require('express');
const bodyParser = require('body-parser');
const db = require('./db');

const app = express();

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));

app.use(express.static('public'));

app.get('/', (req, res) => {
	res.send('Hello Express app');
});

app.listen(3000, () => console.log('server started'));
node v9.7.1 linux/amd64