This is a Next.js project bootstrapped with create-next-app
.
Make sure you have installed all of the following prerequisites on your development machine:
- Node.js (v18)
You can use nvm or nvm-windows to manage your Node versions.
$ yarn install
First, run the development server:
$ yarn run dev
Open http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying pages/index.tsx
. The page auto-updates as you edit the file.
The pages/api
directory is mapped to /api/*
. Files in this directory are treated as API routes instead of React pages.
What I recommend to everyone is spending some time trying to read the documentation of every technology. It's the best way to learn them. Or you can watch some youtube videos to learn the basics.
Here I'll leave some cheatsheets so you can learn "fast".
There are a lot of reasons, the most common reason is because you have errors with Eslint or Typescript.
To see the errors of Eslint you can run:
$ yarn run lint
And for Typescript you can run:
$ npx tsc -p tsconfig.json
If you get any errors running any of them, please try to solve them.
If you don't have any errors, please try making the commit following the guidelines of conventional commits.
For example:
$ git commit -m "feat: my really descriptive commit about a feature"
$ git commit -m "fix: my fix of a problem"
Check if you have any changes files on changed status or staged status. To check that, use:
$ git status
If you have any files there then, you have some options, it depends of the context.
- I want to change of branch because my branch will be deleted, but for some reason I made changes that won't be used.
Just remove the changes that you might have running:
$ git restore .
- I want to change of branch to check another branch but I don't want to loose my changes and I don't want to make a commit.
You can save them temporarily using git stash:
$ git stash
And now you can change of branch.
If you need to recover those changes run:
$ git stash apply
- I want to change of branch and keep my changes with a commit.
Save your changes with git add.
And create a commit, please make sure to follow conventional commit guidelines
Just install/update dependencies:
$ yarn install
Make sure that you have created the .env.local file, you can see the required variables inside .env.example file.