Scaffold
This commit is contained in:
parent
f5df0442ed
commit
2c5e138e9a
28
index.js
28
index.js
@ -1,18 +1,16 @@
|
||||
const express = require('express')
|
||||
const app = express()
|
||||
const cors = require('cors')
|
||||
require('dotenv').config()
|
||||
const express = require("express");
|
||||
const app = express();
|
||||
const cors = require("cors");
|
||||
require("dotenv").config();
|
||||
|
||||
app.use(cors())
|
||||
app.use(express.static('public'))
|
||||
app.get('/', (req, res) => {
|
||||
res.sendFile(__dirname + '/views/index.html')
|
||||
const PORT = process.env.PORT || 16749;
|
||||
|
||||
app.use(cors());
|
||||
app.use(express.static("public"));
|
||||
app.get("/", (req, res) => {
|
||||
res.sendFile(__dirname + "/views/index.html");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const listener = app.listen(process.env.PORT || 3000, () => {
|
||||
console.log('Your app is listening on port ' + listener.address().port)
|
||||
})
|
||||
const listener = app.listen(PORT, () => {
|
||||
console.log("Your app is listening on port " + listener.address().port);
|
||||
});
|
||||
|
2196
package-lock.json
generated
2196
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@ -1,22 +1,23 @@
|
||||
{
|
||||
"name": "fcc-exercise-tracker",
|
||||
"version": "0.1.0",
|
||||
"description": "A REST API project, part of Free Code Camp's curriculum",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.16.4",
|
||||
"cors": "^2.8.5"
|
||||
},
|
||||
"repository": {
|
||||
"url": "https://github.com/freeCodeCamp/boilerplate-project-exercisetracker"
|
||||
},
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"node",
|
||||
"express"
|
||||
]
|
||||
"name": "@radii-fcc-backend/fcc-exercise-tracker",
|
||||
"version": "0.1.0",
|
||||
"description": "A REST API project, part of Free Code Camp's curriculum",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"start": "node index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.16.4",
|
||||
"mongoose": "^7.0.3"
|
||||
},
|
||||
"repository": {
|
||||
"url": "https://github.com/freeCodeCamp/boilerplate-project-exercisetracker"
|
||||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"keywords": [
|
||||
"node",
|
||||
"express"
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user