7, Deploying the Ncmaz-faust
Because Ncmaz-faust is actually a Nextjs project, there are many ways to implement this project. It's best to follow Nextjs' documentation on how to deploy - https://nextjs.org/docs/pages/building-your-application/deploying
If you are a Nextjs developer, then I probably won't elaborate. Where to store it is your choice and you will probably have your own thoughts and insights.
If you are new to Nextjs then I think you are better off hosting on Vercel. If you are ready, you can immediately deploy the Ncmaz-faust project to Vercel here - https://vercel.com/solutions/nextjs?utm_source=next-site&utm_medium=docs&utm_campaign=next-website
An important note: When you deploy to host the project, you need to set the environment variable as described in step 5.
When deploying your Next.js application to Vercel, Environment Variables can be configured in the Project Settings. (Read more Nextjs's docs )
I, __Steps to deploy Ncmaz Faust to Vercel CLI
To deploy a Next.js project to Vercel hosting, you can follow these steps:
Create a Vercel Account:
First, you need to have a Vercel account. If you don't have one, you can sign up at Vercel's website.
Install the Vercel CLI (Command Line Interface):
Open your terminal or command prompt and run the following command to install the Vercel CLI:
Log in to the Vercel CLI:
Run the following command to log in to your Vercel account:
You will be directed to a web page to log in to your Vercel account.
Navigate to your Next.js Project Directory:
Open your terminal and navigate to the root directory of your Next.js project using the
cd
command.
Deploy the Project:
Once you are in your project directory, run the following command to deploy your project to Vercel:
When you run this command for the first time, the Vercel CLI will ask you to name your project. You can use the default name or choose your own.
Configure Deployment:
During the deployment process, Vercel CLI will ask you to configure some options such as the deployment environment (Development, Preview, or Production). You can choose the environment that fits your project.
If you got this error "Routes Manifest Could Not Be Found", please: In the Vercel dashboard, open your "Project Settings" > "Environment Variables" > Add 2 environment variables "
NEXT_PUBLIC_WORDPRESS_URL
" and "FAUST_SECRET_KEY
" to the project and then redeploy by running the "vercel
" command again.Wait for Deployment to Complete:
Vercel will automatically deploy your project. After the deployment process is complete, Vercel will provide a public URL to access your website.
Keep in mind that Vercel integrates seamlessly with Next.js projects and offers many convenient features such as automatic deployments from Git, preview environments, and performance-related features. You can also customize many deployment settings through the project management interface on the Vercel website.
II, __Steps to upload Ncmaz Faust to Vercel via a repo Github:
#Video deploy Ncmaz Faust to Vercel
To deploy the project to Vercel or any nodejs hosting, you need to have your WordPress site hosted on public hosting (not hosted on localhost).
Install the necessary plugins to your WordPress site as shown in this guide.
You can try connecting your WordPress site and
Ncmaz-Faust
project locally and test it working at localhost first (copy the necessary environment variables and test the "npm run dev"
command locally)The prerequisite is that you need a GitHub account - https://github.com/
Let's take a closer look at GitHub and how to configure Github with your computer so you can upload sources from your computer to your GitHub Repo - https://docs.github.com/en - https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github - etc.
Please create a new project on your GitHub account.
As per Github's instructions, connect your this new project to the
ncmaz-faust
folder, then use the GitHub cli commands to push all the files to the repo. Note, create a.gitignore
file and addnode_modules
to the.gitignore
file to not push the node_modules folder.Go to the Vercel site and connect to your GitHub. Then click the "Create a new project" button.
In the "Import Git Repository" section, select the repo you just created, then click the import button.
Next, go to the "Configure Project" section, click on the "Environment Variables" tab, then enter the 2 necessary environment variables of the project as mentioned in step 5.
Then click the "Deploy" button and wait for the successful result.
Last updated