Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Project for Production and Serve Project #1551

Open
ukohae opened this issue May 20, 2024 · 4 comments
Open

Build Project for Production and Serve Project #1551

ukohae opened this issue May 20, 2024 · 4 comments

Comments

@ukohae
Copy link

ukohae commented May 20, 2024

Hi, when I build the project with yarn build and serve the project serve -s build , I am unable to log in with the existing users in the DB or create a new user. What do I do?

@MikeMcC399
Copy link
Contributor

@ukohae

You should follow the README documentation Run the app and start the front-end and back-end with:

yarn dev

@MikeMcC399
Copy link
Contributor

$ yarn dev
yarn run v1.22.19
$ yarn db:seed:dev
$ yarn predev:cognito:ci
$ yarn copy:mock:awsexports && yarn copy:mock:awsexportses5
$ ncp scripts/mock-aws-exports.js src/aws-exports.js
$ ncp scripts/mock-aws-exports-es5.js aws-exports-es5.js
$ ncp ./data/database-seed.json ./data/database.json
$ cross-env NODE_ENV=development concurrently yarn:start:react yarn:start:api:watch
$ vite
$ nodemon --exec yarn tsnode --watch 'backend' backend/app.ts
[start:api:watch] [nodemon] 2.0.22
[start:api:watch] [nodemon] to restart at any time, enter `rs`
[start:api:watch] [nodemon] watching path(s): 'backend'
[start:api:watch] [nodemon] watching extensions: ts,json
[start:api:watch] [nodemon] starting `yarn tsnode backend/app.ts`
$ nyc --silent ts-node -P tsconfig.tsnode.json backend/app.ts
[start:react] 
[start:react]   VITE v4.4.2  ready in 820 ms
[start:react]
[start:react]   ➜  Local:   http://localhost:3000/
[start:react]   ➜  Network: use --host to expose
[start:api:watch] Browserslist: caniuse-lite is outdated. Please run:
[start:api:watch]   npx update-browserslist-db@latest
[start:api:watch]   Why you should do it regularly: https://github.com/browserslist/update-db#readme
[start:api:watch] express-validator: sanitize(), sanitizeBody() and other sanitization-only middlewares have been deprecated.
[start:api:watch] Please use check(), body() and others instead, which must offer the same API, and more.
[start:api:watch] Backend server running at http://localhost:3001

@ukohae
Copy link
Author

ukohae commented May 20, 2024

@MikeMcC399

I want to deploy the artifacts and test it in the cloud.

When I run yarn build, it builds an artifacts by creating a build folder.

When I try to serve the build artifacts with serve -s build I am unable to log in.

I don’t want test to locally by running yarn dev, I want to test the content in the build artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants