-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
18 lines (14 loc) · 690 Bytes
/
App.js
File metadata and controls
18 lines (14 loc) · 690 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
const express = require('express')
var path = require('path');
const app = express()
const port = 5000
// Some definitions for static files
app.get('/', function (req, res) { res.sendFile(path.join(__dirname + '/index.html')) })
app.get('/favicon.ico', function (req, res) { res.sendFile(path.join(__dirname + "/favicon.ico")) })
// Custom javascript files
app.use('/customjs', express.static('customjs'))
app.use('/static', express.static('static'))
app.use('/data', express.static('data'))
app.use('/js', express.static('node_modules'))
//////////////////////////////////////////////////////////
app.listen(port, () => console.log(`Example app listening at http://localhost:${port}`))