This is a Next.js project bootstrapped with create-next-app.
First, go to omnify_mini_event_management_system_backend and set below mentioned keys in the .env to start node.js, express.js server.
.env Keys:
DATABASE_URL="YOUR_POSTGRES_DB_URL"
PORT=4000 # Set it as it is this is the port where your backend is running.
FRONTEND_URL="http://localhost:3000" # or the port where frontend is running to enable cors.After this run below commands one by one to start the dev server:
npm install
npx prisma migrate dev --name setup #to setup prisma orm
npx prisma generate #to generate prisma client
npm run build && npm run start # to start backend api server
npm run docs #to setup and see the swagger api docs
npx prisma studio # to see the db content as a db studio in you browser on default port: http://localhost:5555Now go to omnify_mini_event_management_system folder and set keys.
.env Keys:
NEXT_API_BASE_URL: # in here put the main url such as http://localhost:4000/apiAfter this run below command to start the frontend:
npm install
npm run devThen you can access the frontend on: http://localhost:3000