#Beginner questions about the fresh template installation

21 messages · Page 1 of 1 (latest)

empty dock
#

Trying to figure out how to build into production as dev seems to be as big as 35mb...

timber yachtBOT
round karma
#

@empty dock Is that Payload 2.0? I know it was big in development in 2.0, but they are smaller in production, and it's even smaller in 3.0 with around 412kb total JS in production.

empty dock
round karma
#

@empty dock Just a warning and Payload 3.0 is still in beta.

empty dock
round karma
#

@empty dock Did you set the .env file with your DB_URI? If you want to start it you run yarn build & yarn start

#

You should be able to go to /admin to see the payload admin

#

@empty dock Also remove that image, the IP is still in there

#

Also it should be accessible on localhost:3000

empty dock
empty dock
#

Ok so there is no command start:
"scripts": {
"dev": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts nodemon",
"seed": "rm -rf media && cross-env PAYLOAD_SEED=true PAYLOAD_DROP_DATABASE=true PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts ts-node src/server.ts",
"build:payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload build",
"build:server": "tsc --project tsconfig.server.json",
"build:next": "cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NEXT_BUILD=true node dist/server.js",
"build": "cross-env NODE_ENV=production yarn build:payload && yarn build:server && yarn copyfiles && yarn build:next",
"serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload/payload.config.js NODE_ENV=production node dist/server.js",
"eject": "yarn remove next react react-dom @next/eslint-plugin-next && ts-node eject.ts",
"copyfiles": "copyfiles -u 1 "src/**/*.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png,js}" dist/",
"generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload generate:types",
"generate:graphQLSchema": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload generate:graphQLSchema",
"lint": "eslint src",
"lint:fix": "eslint --fix --ext .ts,.tsx src",
"payload": "cross-env PAYLOAD_CONFIG_PATH=src/payload/payload.config.ts payload"
},

#

I guess yarn serve

round karma
#

@empty dock So that looks like a version 2 package.json, did you really clone that repo? Because they way payload is set up in 3.0 is a bit different.

#

Also if you have a repo already in payload 2.0 and have a lot of things setup I would not advice to port it just yet.

#

I have to drop of for sleep.

empty dock
empty dock
empty dock
#

Beginner questions about fresh template installation