This commit is contained in:
Manish 2023-03-29 17:24:36 +11:00
parent 3f967841d0
commit c65f99f988
3 changed files with 777 additions and 219 deletions

View File

@ -1,20 +1,17 @@
var express = require('express'); var express = require("express");
var cors = require('cors'); var cors = require("cors");
require('dotenv').config() require("dotenv").config();
var app = express(); var app = express();
app.use(cors()); app.use(cors());
app.use('/public', express.static(process.cwd() + '/public')); app.use("/public", express.static(process.cwd() + "/public"));
app.get('/', function (req, res) { app.get("/", function (req, res) {
res.sendFile(process.cwd() + '/views/index.html'); res.sendFile(process.cwd() + "/views/index.html");
}); });
const port = process.env.PORT || 3000; const port = process.env.PORT || 3000;
app.listen(port, function () { 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

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
{ {
"name": "file_metadata", "name": "@radii-fcc-backend/file_metadata",
"version": "0.0.1", "version": "0.0.1",
"description": "API project for freeCodeCamp", "description": "API project for freeCodeCamp",
"main": "index.js", "main": "index.js",
@ -7,17 +7,18 @@
"start": "node index.js" "start": "node index.js"
}, },
"dependencies": { "dependencies": {
"cors": "^2.8.5",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"express": "^4.16.4", "express": "^4.16.4",
"cors": "^2.8.5" "multer": "^1.4.5-lts.1"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/freeCodeCamp/boilerplate-project-filemetadata" "url": "https://radii.dev/freeCodeCamp.org-Back-End-Dev-and-APIs/filemetadata"
}, },
"keywords": [ "keywords": [
"node", "node",
"express" "express"
], ],
"license": "MIT" "license": "AGPL-3.0-or-later"
} }