-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathserver.js
More file actions
30 lines (27 loc) · 853 Bytes
/
server.js
File metadata and controls
30 lines (27 loc) · 853 Bytes
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 ${host}:${port}`)
})