BHRS
John
JUL 31 2022
Generate a file named .env in the root directory ensure the content incude as below:
DATABASE_URL="mysql://xxx:xxxxx@xxx.xxx.us-east-1.rds.amazonaws.com:3306/xxx"
SHADOW_DATABASE_URL="mysql://xxxx:xxxx@xxx.xxx.us-east-1.rds.amazonaws.com:3306/xxx"
This is the file which Prisma will operate it generate database and tables by it.
Generate .env.local file including the content as below:
ACCESS_KEY=xxxxx # this is AWS S3
SECRET_KEY=xxxxxx # this is AWS S3
BUCKET_NAME=xxx-xxx-xxx # this is AWS S3
DATABASE_URL="mysql://xx:xx@xx.cbetxkdyhwsb.us-east-1.rds.amazonaws.com:3306/xx" # this is for the db
npm install --save-dev hardhat@latest
npx hardhat
npx hardhat compile
npx hardhat test
If there is no any error after above steps, the environment works.
npx hardhat run scripts/run.js
npx hardhat run scripts/deploy.js --network goerli
The result will give the new address of the smart contracts. Then the address needs to be modified in the web3.js.
- Login in https://vercel.com/ with any account.
- Generate a project.
- Config the Github url as Next.js project.
- Commit source codes to the Github repo.