repl.it
@turbio/

server side react

Nodejs

No description

fork
loading
Files
  • index.js
  • public
  • views
  • Packager files
  • package-lock.json
  • package.json
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
const express = require('express');
const reactViews = require('express-react-views');

const app = express();

app.use('/public', express.static('public'));
app.set('views', __dirname + '/views');
app.set('view engine', 'jsx');
app.engine('jsx', reactViews.createEngine());

app.get('/', (req, res) => {
	res.render('index');
})

app.listen(() => console.log(`server is up!`));
Fetching token
?