This repository contains the front-end and back-end implementations for DarbAI-API-Endpoint, managed by MohammmedAb. Darb-AI website has a seamless and friendly user interface implemented using React and Tailwind CSS
Node.js via Installer
Download the installer directly through Node.js website: Node.js
nodemon via npm
npm install -g nodemon
ts-node via npm
npm install -g ts-node
typescript via npm
npm install -g typescript
clone the repository
git clone https://github.com/MOHAMMAD-ALSUBAIE/Darb-AI.git
navigate to repository
cd Darb-AI
install dependencies
npm install
start client
npm run dev
navigate to repository
cd Darb-AI
then
cd backend
install dependencies
npm install
create .env
file similar to .env.example
.
the .env
file must contain two variables: DATABASE_URL
and secretKey
.
you can accomplish this by either creating a new PlanetScale
account, setting up a database, and filling in these variables, or by using the pre-made account variables provided to you.
after successfully setting up the .env
file, run the following command to push the state of the Prisma schema file to the database.
secrtyKey use for encrypt the session id of the user that store in the cookies insed the browser, Write your random secretKey
and keep it secure in .env
file
npx prisma db push
start the server
nodemon src/index.ts