-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
38 lines (30 loc) · 865 Bytes
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const config = require('./config.json');
var express = require('express');
var app = express();
var cors = require('cors');
var port = process.env.PORT || config.port || 3000;
var listener = app.listen(port, function()
{
console.log(process.env.PROJECT_DOMAIN.toUpperCase() + ' is online! [Port: ' + listener.address().port + ']');
});
app.use(cors());
app.get('/', function(req, res)
{
res.sendFile(__dirname + '/client/index.html');
});
app.get('/stylesheet.css', function(req, res)
{
res.sendFile(__dirname + '/client/stylesheet.css');
});
app.get('/script.js', function(req, res)
{
res.sendFile(__dirname + '/client/script.js');
});
app.get('/initial.js', function(req, res)
{
res.sendFile(__dirname + '/client/initial.js');
});
app.get('/db/emojis.js', function(req, res)
{
res.sendFile(__dirname + '/client/db/emojis.js');
});