Skip to content

Set up local project

Setup for the backend project is very simple:

  • Clone the GitLab project into your machine
  • npm i to install dependencies
  • npm i --g sanity@latest to install the Sanity CLI
  • Set up environment variables
  • sanity dev / npm run dev to 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 i to install dependencies
  • npm i -g netlify-cli to install the Netlify CLI
  • Set up environment variables
  • netlify dev to run the project - it is important to use the CLI command instead of npm run dev because 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.