Cinemate Backend is the server-side component of the Cinemate project, responsible for handling data storage, retrieval, and business logic.
- Server Tech Stack
- Features
- License
- Usage/Examples
- Environment Variables
- Run Locally
- Related
- Credit
- Acknowledgements
- User Authentication and Authorization
- Configurations for the handling of Users and the User's Media Content
- Data Storage and Retrieval with MongoDB and Prisma
- Environment Variable Configuration
- Server-side Routing and Middleware with Express
- Cross-Origin Resource Sharing (CORS) handling with Cors middleware
// If there's no user, or if the user has no bookmarks, return 10 random media
if (!user || user.bookmarkIds.length === 0) {
let trending = []
let indexes = new Set()
for (let i = 0; i < 10; i++) {
let index = Math.floor(Math.random() * media.length)
while (indexes.has(index)) {
index = Math.floor(Math.random() * media.length)
}
trending.push({...media[index], score: 0})
}
return res.json(trending.slice(0, 10))
}
To run this project, you will need to add the following environment variables to your .env file
DATABASE_URL
PORT
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
BUCKET_NAME
BUCKET_REGION
CLERK_SECRET_KEY
Clone the project
git clone https://github.com/grammerjam/tg-main.git
Go to the project directory
cd team-miamiangels-backend
Install dependencies
npm install
Start the server
npm run start
Here are some related projects https://movie-web.app/browse/game
Jose Facade - Full Stack Developer / Audio Engineer & Director | GitHub
Alejandro Vecchio - Lead Developer | GitHub
Olivia Banks - Project Manager / Athlete
Luis Perez - Full Stack Developer / Powerlifter | GitHub
Special thanks to Allan Tito and the senior developers from the Grammerhub community for making this project happen.
Powered by Grammerhub