The process for deploying the REST API will be almost the same as we just went through for the admin website.
But, in this case, we'll be deploying a Node.js REST API instead of a Next.js application.
Before deploying the application in the next steps, ensure the database credentials in your /admin/rest-api/.env
file (DB_USERNAME
& DB_PASSWORD
) are populated and correct. If those values are incorrect or empty, you won't be able to interact with the database.
Also, make sure the URLs in your config.js file are correct.
With those credentials set, let's get started!
Let's first push the project code for your admin REST API to GitHub/GitLab.
First, we need to create a repository on GitHub that you can upload the code to.
Using the same GitHub account you used in the previous section, navigate to the "Create a new repository" page.