https://github.com/gastonpereyra/vercel-template
This is a Template to create a Custom Service in Vercel
https://github.com/gastonpereyra/vercel-template
node service template vercel
Last synced: about 2 months ago
JSON representation
This is a Template to create a Custom Service in Vercel
- Host: GitHub
- URL: https://github.com/gastonpereyra/vercel-template
- Owner: gastonpereyra
- License: mit
- Created: 2021-01-09T23:46:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-31T18:40:56.000Z (over 4 years ago)
- Last Synced: 2025-05-22T11:33:06.272Z (about 1 year ago)
- Topics: node, service, template, vercel
- Language: JavaScript
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vercel Template

## Description
This is a Template to create a Custom Service in Vercel
## Guide
### Create a new Repository
- When you are creating a new Repository, choose this as a template
- As name choose `{serviceName}-service`, for example `example-service`
### Replace
- `{serviceName}`: For the Service Name
- `{serviceDescription}`: For the Service Description
- `{service-Banner}`: For the Service Image Banner
> :warning: If you are not me, or you do not create in my account may change my username for yours
### Readme
- Delete this file
- Change `README.tpl` for `README.md`
### Vercel
- Create a new Proyect in Vercel
- Import the new Repository
- Choose create as your own personal proyect
- Continue
- Wait to deploy
### Setup before Code
- Run `npm i`
- Install every depency
- Run `npm run vercel-login`
- Can enter your Github account for logging
- Run `npm start`
- If is the first time, Vercel-CLI will try to config locally the Service.
- It will start the local server (to develop), in `https://localhost:3000`
- Some examples are already setup
- `https://localhost:3000` -> Will Show a HTML
- `https://localhost:3000/api/message` -> Will try to use an API
- `https://localhost:3000/api/message/100` -> Will try to use an API with ID
- Any other will trigger "not found" API
### Develop
You are ready to start coding,
This template has:
- Testing
- [Mocha](https://www.npmjs.com/package/mocha)
- [Sinon](https://www.npmjs.com/package/sinon)
- Code Quality
- [EsLint](https://www.npmjs.com/package/eslint) with AirBnB v13 plugin
- [Istanbul](https://www.npmjs.com/package/nyc)
- Code
- [Handlebars](https://www.npmjs.com/package/handlebars) - For Help to Render HTML
- [Vercel](https://www.npmjs.com/package/vercel) - For deploys and local develop
- [Verce-Serverless-Api](https://www.npmjs.com/package/vercel-serverless-api) - To Hanlde Serverless Function easiest