This technology has no Slice Machine integration
This framework has no integration with Prismic's developer tool, Slice Machine. You can still build a Prismic website with this technology by using Prismic's Legacy Builder. However, if you're starting a new project with Prismic, we strongly recommend using a technology that integrates with Slice Machine: Next.js or Nuxt.
Launch a starter project with Express and Prismic in a few minutes.
Choose a project
Choose one of the below projects to install. You can see a preview of the project and explore the source code on GitHub.
Run the theme command
To install a sample project, run the theme command. The theme command clones the project locally, installs all necessary dependencies, and creates a Prismic repository with custom types and pre-built content.
The command will ask you to give the name of your Prismic repository.
npx prismic-cli@latest theme --theme-url https://github.com/prismicio/nodejs-blog --conf prismic-configuration.js
npx prismic-cli@latest theme --theme-url https://github.com/prismicio/nodejs-website --conf prismic-configuration.js
npx prismic-cli@latest theme --theme-url https://github.com/prismicio/nodejs-multi-language-site --conf config/prismic-configuration.js
Configuration for the multi-language starter
For the multi-language project, you'll have a default locale configuration on your repo. This will be:
- English (
en-gb) as the master locale
- And, French (
fr-fr) as an additional locale
To add additional locales, navigate to Settings > Translations & locales in your repository. Learn more about how to add languages.
If you change the master locale, update your language settings in the config folder of the project. Open the
site-config.js file and replace the
defaultLanguage with the master language of your repository.
Verify repository name
prismic-configuration.js file and verify that the Prismic repo matches the URL of the Prismic repository created earlier. If the URL for your repository is
https://my-awesome-repository.prismic.io, then you'll need to replace
your-repo-name in the config file with
nodemon is a tool for restarting Node.js applications automatically on file changes. Launch the terminal, and install
# Install nodemon globally on your machine npm install nodemon --global
# Install nodemon globally on your machine yarn global add nodemon
Run the website in development mode
In your terminal, navigate to the root of the project directory and run the following command to launch a local development server at http://localhost:3000:
Now you can customize the code and content however you want, and deploy your project when you're ready.
Was this article helpful?
Can't find what you're looking for? Spot an error in the documentation? Get in touch with us on our Community Forum or using the feedback form above.