Scaffold
This commit is contained in:
parent
3f967841d0
commit
c65f99f988
17
index.js
17
index.js
@ -1,20 +1,17 @@
|
||||
var express = require('express');
|
||||
var cors = require('cors');
|
||||
require('dotenv').config()
|
||||
var express = require("express");
|
||||
var cors = require("cors");
|
||||
require("dotenv").config();
|
||||
|
||||
var app = express();
|
||||
|
||||
app.use(cors());
|
||||
app.use('/public', express.static(process.cwd() + '/public'));
|
||||
app.use("/public", express.static(process.cwd() + "/public"));
|
||||
|
||||
app.get('/', function (req, res) {
|
||||
res.sendFile(process.cwd() + '/views/index.html');
|
||||
app.get("/", function (req, res) {
|
||||
res.sendFile(process.cwd() + "/views/index.html");
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
const port = process.env.PORT || 3000;
|
||||
app.listen(port, function () {
|
||||
console.log('Your app is listening on port ' + port)
|
||||
console.log("Your app is listening on port " + port);
|
||||
});
|
||||
|
970
package-lock.json
generated
970
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "file_metadata",
|
||||
"name": "@radii-fcc-backend/file_metadata",
|
||||
"version": "0.0.1",
|
||||
"description": "API project for freeCodeCamp",
|
||||
"main": "index.js",
|
||||
@ -7,17 +7,18 @@
|
||||
"start": "node index.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^8.2.0",
|
||||
"express": "^4.16.4",
|
||||
"cors": "^2.8.5"
|
||||
"multer": "^1.4.5-lts.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/freeCodeCamp/boilerplate-project-filemetadata"
|
||||
"url": "https://radii.dev/freeCodeCamp.org-Back-End-Dev-and-APIs/filemetadata"
|
||||
},
|
||||
"keywords": [
|
||||
"node",
|
||||
"express"
|
||||
],
|
||||
"license": "MIT"
|
||||
"license": "AGPL-3.0-or-later"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user