This is a Template repository aimed at allowing users to get started with Vercel Functions as quickly as possible. It is based off of the Official Guide provided by Vercel Serverless Functions.
"@tsconfig/node14": "^1.0.0",
"@types/jest": "^26.0.23",
"@types/jest-when": "^2.7.2",
"@vercel/node": "^1.11.0",
"jest": "^27.0.1",
"jest-when": "^3.3.1",
"ts-jest": "^27.0.0",
"typescript": "^3.9.3"Introduction is a good place to start.
- Use the Template on the right to use this repository as a starting area for your own project.
After making an account I recommend
- Using the template.
- Linking the project on Vercel to the newly templated entity.
git clone <templated_entity>.- Install Vercel CLI.
- Link your project through Vercel UI (their website).
- Using Vercel CLI, link the Cloned project.
- You're ready to dev!
After setting up the project link I recommend
vercel dev.
This launches a dev environment to interact with the function(s) you have modified.
This is independent of Vercel and is utilizing jest framework.
npm run test.
Runs all test suites. There is only 1 test by default. Output
➜ npm run test
> vercel-serverless-function@1.0.0 test
> jest
PASS test/Model.test.ts
get() =>
✓ SHOULD return "TEST" (1 ms)
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 1.816 s, estimated 2 s
Ran all test suites.