Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
JDeepD committed Dec 17, 2023
1 parent caafafe commit 9286137
Showing 7 changed files with 801 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.idea/
.env
.env.local
21 changes: 21 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"name": "proto-shorturl-backend",
"version": "1.0.0",
"description": "Prototype for ShortURL backend",
"main": "index.js",
"type": "module",
"scripts": {
"dev" : "nodemon server.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^16.3.1",
"express": "^4.18.2",
"helmet": "^7.1.0",
"morgan": "^1.10.0",
"nodemon": "^3.0.2"
}
}
752 changes: 752 additions & 0 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import express from "express";
import cors from "cors";
import helmet from "helmet";
import morgan from "morgan";

const app = express();
const PORT = 5000;

app
.use(cors())
.use(helmet())
.use(morgan("dev"))

app.get("/", (req, res) => {
return res
.status(200)
.json({
"msg": "Success"
})
})

app.listen(PORT, () => {
console.log(`Service active on PORT ${PORT}`)
})
Empty file added src/controllers/.gitkeep
Empty file.
Empty file added src/routers/.gitkeep
Empty file.
Empty file added src/utils/.gitkeep
Empty file.

0 comments on commit 9286137

Please sign in to comment.