Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions backend/.env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# DATABASE_URL="postgresql://johndoe:randompassword@localhost:5432/mydb?schema=public"

DATABASE_URL="postgresql://prisma:prisma@db:5432/exam_bud?schema=public"
PORT=4000

CLOUDINARY_URL=cloudinary://<your_api_key>:<your_api_secret>@<product_environment_name>
CLOUDINARY_PUBLIC_ID=<product_environment_name>

# Firebase Configuration
FIREBASE_PROJECT_ID=<your_firebase_project_id>
FIREBASE_SERVICE_ACCOUNT_KEY_PATH=<your_firebase_service_account_key_path>
12 changes: 0 additions & 12 deletions backend/.env.test

This file was deleted.

1 change: 1 addition & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
# Keep environment variables out of version control
.env
Exam-bud-firebase.json
8 changes: 5 additions & 3 deletions backend/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ app.use(cors());
app.use(express.json());
app.use('/uploads', express.static(path.join(__dirname, 'uploads')));

// dummy auth
app.use(require('./src/middleware/dummyAuth'));

//routes
app.use(require('./src/routes'));

//auth routes
const authRoutes = require('./src/routes/auth');

app.use('/api/auth', authRoutes);

app.listen(process.env.PORT, () =>
console.log(` Backend running on http://localhost:${process.env.PORT}`)
);
Loading
Loading