Clone the repo
git clone <repo>
When you want to start a new feature, create a new branch
git branch <new-branch>
Check to see if the new branch was created
git branch
To switch to the new branch
git checkout <branch-name>
Alternatively the git checkout command accepts a -b argument that will create the new branch and immediately switch
git checkout -b <branch-name>
Commit the branch with a descriptive message
git commit -a -m "Added a cool new feature"
Push to the branch
git push origin <branch-name>
Install Docker Desktop
docker --version
Change directory, make a new directory - javascript, and list the contents of the current directory
cd /path/
mkdir javascript
ls
javascript
Delete a directory
rm -r directory-name
Project working directory
pwd
Copy a file to directory
cp main.js javascript
Rename a directory
Rename-Item "directory"
Supply values for the following parameters: NewName:
new-directory
Install the dependancies
npm i --save-dev prisma typescript ts-node @types/node nodemon
Create tsconfig.json
{
"compilerOptions": {
"sourceMap": true,
"outDir": "dist",
"strict": true,
"lib":["esnext"],
"esModuleInterop": true,
}
}
start a new prisma project with postgresql
npx prisma init --datasource-provider postgresql
Initialize the prisma client will create the following
prisma/schema.prisma .env .gitignore
Update the schema.prisma file to include models and run the command. The command will create prisma/migrations/timesatmp/migrations.sql
npx prisma migrate dev --name init
Install the Prisma Client
npm i @prisma/client
To manually generate the client run
npx prisma generate
npx prisma format
To log all of your prisma queries
const prisma = new PrismaClient({ log: ["query"] });
To link environment variables
vercel link
vercel env pull env.local