Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngduc/vercel-express
Vercel Express and UI Webapp Example. Live Demo - https://vercel-express-ngduc.vercel.app/
https://github.com/ngduc/vercel-express
boilerplate express expressjs node nodejs vercel
Last synced: 3 days ago
JSON representation
Vercel Express and UI Webapp Example. Live Demo - https://vercel-express-ngduc.vercel.app/
- Host: GitHub
- URL: https://github.com/ngduc/vercel-express
- Owner: ngduc
- Created: 2020-11-07T07:03:06.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-25T03:18:48.000Z (5 months ago)
- Last Synced: 2024-07-25T10:13:56.562Z (5 months ago)
- Topics: boilerplate, express, expressjs, node, nodejs, vercel
- Language: TypeScript
- Homepage:
- Size: 188 KB
- Stars: 69
- Watchers: 3
- Forks: 44
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vercel-Express
Vercel Express and UI fullstack webapp example.
Live Demo - https://vercel-express-ngduc.vercel.app
### README
See [backend/README.md](./backend/README.md)
### Set up & Deploy with Vercel
Star and clone this repo, update package.json with your information (project name, your name, etc.), verify vercel.json.
```
$ npm install
$ cd ./backend && npm install && npm run build
$ cd ..
$ npm install vercel -g
$ vercel
```- Vercel will generate a ".vercel" directory, don't share or commit this one!
- After deploying, open your URL like this: YOUR-VERCEL-APP-ID.vercel.app
- Build your backend and ui, the outputs are located at "backend/build" and "ui/buid".
- Some boilerplate generators output the built files to "dist" instead of "build", so update your vercel.json accordingly.### Code
Backend
- See [backend/README.md](./backend/README.md)Frontend
- See [ui/README.md](./ui/README.md)### [vercel.json](./vercel.json)
- Map API routes (/api/...) and static (UI) routes (/...).
- Environment variables - examples:
- ```$ vercel secrets add my-mongodb-uri mongodb+srv://:@clusteridxxx.mongodb.net/?retryWrites=true```
- add "env" to vercel.json ```{ "env": { "MONGODB_URI": "@my-mongodb-uri" }, ... }```### Links
- Article https://medium.com/javascript-in-plain-english/create-and-deploy-a-node-js-express-app-for-free-f75d8796ba70
- Article https://vercel.com/guides/using-express-with-vercel
- Node Express Mongoose boilerplate https://github.com/ngduc/node-rem