Set up local project
Sanity
Section titled “Sanity”Setup for the backend project is very simple:
- Clone the GitLab project into your machine
npm ito install dependenciesnpm i --g sanity@latestto install the Sanity CLI- Set up environment variables
sanity dev/npm run devto run the project
Default local URL is http://localhost:3333.
Remember, any changes you have in your machine will be deployed when executing sanity deploy. Pushing to the repository is only the way to share the project with the team, but does not deploy.
The only environment variable you need is the preview token.
- Clone the GitLab project into your machine
npm ito install dependenciesnpm i -g netlify-clito install the Netlify CLI- Set up environment variables
netlify devto run the project - it is important to use the CLI command instead ofnpm run devbecause it sets up the required Deno environment to be able to run projects with Edge functions locally without errors
Default local URL is http://localhost:9020.
Any changes pushed to the repository’s main branch will be automatically deployed to Production.
Environment variables are available in the Project Configuration section of the Netlify project. If needed, we can share an encrypted file with the variables.