forked from SPACERS-NASA-Space-Apps-Barcelona/web-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
14 lines (12 loc) · 646 Bytes
/
Copy pathserver.js
File metadata and controls
14 lines (12 loc) · 646 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
const express = require('express');
const app = express();
const path = require('path');
app.use(express.static(__dirname))
app.use('/build/', express.static(path.join(__dirname, 'node_modules/three/build')));
app.use('/jsm/', express.static(path.join(__dirname, 'node_modules/three/examples/jsm')));
app.use('/js/', express.static(path.join(__dirname, 'node_modules/three/examples/js')));
app.use('/libs/', express.static(path.join(__dirname, 'node_modules/three/examples/js/libs')));
app.use('/addons/', express.static(path.join(__dirname, 'node_modules/three/addons')));
app.listen(8000, () =>
console.log('Visit http://127.0.0.1:8000')
);