- You need to host Postgres DB 14 or higher
- You can use docker container or local installation
docker run --name some-postgres -e POSTGRES_USER=username POSTGRES_PASSWORD=mysecretpassword POSTGRES_DB=blog -d postgres
- Create .env file in the project root folder:
DATABASE_URL="postgresql://username:password@host:port/db_name"
PORT=desired_application_port
Note: This step can be changed with adding mentioned env variables to your run environment
npm install
npx prisma generate
npx prisma migrate dev
npx prisma db seed
- dev build
node "./node_modules/webpack/bin/webpack.js" --config "./blog-express-ui/config/webpack.dev.js"
- prod build
node "./node_modules/webpack/bin/webpack.js" --config "./blog-express-ui/config/webpack.prod.js"
node ./blog-express-be/src/app.js