Skip to content

Commit

Permalink
Nodejs + Express mini-server, importing official cesium npm.
Browse files Browse the repository at this point in the history
  • Loading branch information
pupitetris committed Jun 20, 2023
1 parent 08c2862 commit 5af8a08
Show file tree
Hide file tree
Showing 4 changed files with 1,304 additions and 131 deletions.
16 changes: 16 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const Express = require('express');
const Morgan = require('morgan');

const PORT = 8001;

const app = Express();

app.use(Morgan('common'));
app.use(Express.urlencoded({ extended: true }));

app.use('/', Express.static(__dirname + '/htdocs'));
app.use('/src', Express.static(__dirname + '/src'));
app.use('/cesium', Express.static(__dirname + '/node_modules/cesium/Build/CesiumUnminified'));
app.get('/', (req, res) => { res.redirect('index.html'); });

app.listen(PORT);
3 changes: 3 additions & 0 deletions nodemon.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"ignore": ["README.md", "htdocs"]
}
Loading

0 comments on commit 5af8a08

Please sign in to comment.