-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserver.js
30 lines (27 loc) · 860 Bytes
/
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
/* ******************************************
* This server.js file is the primary file of the
* application. It is used to control the project.
*******************************************/
/* ***********************
* Require Statements
*************************/
const express = require("express")
const env = require("dotenv").config()
const app = express()
const static = require("./routes/static")
/* ***********************
* Routes
*************************/
app.use(static)
/* ***********************
* Local Server Information
* Values from .env (environment) file
*************************/
const port = process.env.PORT
const host = process.env.HOST
/* ***********************
* Log statement to confirm server operation
*************************/
app.listen(port, () => {
console.log(`App listening on http://${host}:${port}`)
})