Install and Deploy NextMerce
In this part of the documentation we will show you how to install NextMerce.
Before moving forward, make sure you have Node.js installed on your machine. Otherwise the installation commands will not work.
1. Download template and extract it. Then CD into that directory and run this command to install the dependencies:
npm install
or
yarn install
2. After completing the installation run this command to start the developement server:
npm run dev
or
yarn dev
Next Steps
Once the installation is done,
Follow these steps to complete the installation.
Note: you can use any PostgreSQL you want. Just save the database url in the env using this name:
DATABASE_URL=YOUR_DB_CONNECT_URL
Follow the Sanity Integration guide to setup the project. After that take the Sanity ProjectID and title, and save them in the .env file under these variable names:
NEXT_PUBLIC_SANITY_PROJECT_ID=""
NEXT_PUBLIC_SANITY_PROJECT_TITLE=""
Deploying to server
After the installation and customization are done you have to deploy the template. Here are the steps you need to follow to deploy the template:
Build the template locally and then deploy it to the server. Build the template using the following command, When you run this command you’ll get a build folder. Now you can upload this folder to your server and your site will be live.
npm run build
or
yarn build