-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
45 lines (34 loc) · 1.19 KB
/
server.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
38
39
40
41
42
43
44
45
//jshint esversion:6
const express = require('express');
const request = require('request');
const bodyParser = require('body-parser');
const app = express();
app.use(express.static('public'));
app.use(bodyParser.urlencoded({ extended: true }));
app.get('/', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
app.get('/index.html', function (req, res) {
res.sendFile(__dirname + '/index.html');
});
app.get('/Fundamentals/KYM', function (req, res) {
res.sendFile(__dirname + '/Fundamentals/KYM.html');
});
app.get('/Basics/About', function (req, res) {
res.sendFile(__dirname + '/Basics/About.html');
});
app.get('/Construction', function (req, res) {
res.sendFile(__dirname + '/construction.html');
});
app.get('/Fundamentals/ComputerLang', function (req, res) {
res.sendFile(__dirname + '/Fundamentals/ComputerLang.html');
});
app.get('/Fundamentals/Compiler', function (req, res) {
res.sendFile(__dirname + '/Fundamentals/Compiler.html');
});
app.get('/Fundamentals/HelloWorld', function (req, res) {
res.sendFile(__dirname + '/Fundamentals/HelloWorld.html');
});
app.listen(process.env.PORT || 3000, function () {
console.log('Server Started at port http://localhost:3000');
});