-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 349ed7e
Showing
26 changed files
with
6,963 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# Node modules | ||
**/node_modules | ||
**/dist | ||
**/.next | ||
**/build | ||
**/out | ||
|
||
# Environment variables | ||
.env | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Vercel specific | ||
.vercel | ||
output/ | ||
|
||
# MacOS files | ||
.DS_Store | ||
|
||
# IDE specific files | ||
.idea/ | ||
*.sublime-workspace | ||
*.sublime-project | ||
.vscode/ | ||
*.code-workspace | ||
|
||
# Others | ||
*.tgz | ||
*.zip | ||
*.rar | ||
*.tar | ||
*.gzip | ||
*.gzip2 | ||
*.tar.gz | ||
*.tgz | ||
|
||
# Cache files | ||
.cache/ | ||
.cache-loader/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"name": "unisocial-backend", | ||
"version": "1.0.0", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"keywords": [], | ||
"author": "", | ||
"license": "ISC", | ||
"description": "" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import express from 'express'; | ||
import cors from 'cors'; | ||
import dotenv from 'dotenv'; | ||
|
||
dotenv.config(); | ||
|
||
const app = express(); | ||
const PORT = process.env.PORT || 5001; | ||
|
||
app.use(cors()); | ||
app.use(express.json()); | ||
|
||
app.get('/api', (req, res) => { | ||
res.send('Hello from the API!'); | ||
}); | ||
|
||
app.listen(PORT, () => { | ||
console.log(`Server is running on http://localhost:${PORT}`); | ||
}); |
Oops, something went wrong.