1. Clone this git repo, rename folder and navigate into it
git clone https://github.com/ljvdhooft/vercel-express-framework.git
mv vercel-express-framework new-name
cd new-name
2. Install Node Packages for local use
npm install express
npm install node-fetch@2
npm install dotenv
3. Run locally:
Using npm:
npm run build
Or using Nodemon (if installed):
nodemon index.js
4. Deploy to Vercel
vercel deploy
Go to Settings > General > Build & Development Settings:
For Output Directory, set override to `public`
5. Create Environment Variables as desired
Enjoy! Keep in mind that the vercel project isn't linked to the git repo. To deploy to vercel, use:
vercel deploy --prod