This project provides a simple Express.js backend with a static frontend. It includes a reusable menu component on two pages and an example API endpoint.
- Node.js installed on your machine.
- A GitHub account.
git clone https://github.com/Corentin-Robac/my-express-backend.git
Navigate to the backend folder and install Node.js dependencies:
cd my-express-backend/backend
npm run install-dependencies
Edit the .env file with your GitHub credentials:
PORT=3000
GITHUB_USERNAME=your-github-username
GITHUB_REPO=your-repo-name
.env
To remove the current Git origin and link your own GitHub repository using the information in the .env file, run the following:
npm run setup-repo
Create your repo on Github with same credentials from .env file then run:
cd ..
git push -u origin main
Take care than head branch is "main" instead of "master"
npm run start-server
You can now access the application at: