Skip to content

deekshasharma/typescript-api-vercel

Repository files navigation

TypeScript Serverless APIs on Vercel

semantic-release

This directory is an example of creating serverless APIs in TypeScript and deploy on Vercel platform.

Features

  • Serverless functions written in TypeScript
  • Deployment on Vercel for main branch and pull requests
  • Tests support using Jest
  • CI setup using GitHub Actions to run tests on every push to GitHub (on every branch)
  • CI setup to run tests against Vercel Preview URLs and add them as check before PR could merge. See GitHub Action
  • CI Setup to create a new release using semantic-release
  • Ability to compute function (/address) and also to make API calls (/currency)

Available APIs

Local

http://localhost:3000/api/hello?name=<string>
  • The value of number must be between 1 and 50(inclusive)
  • The valid values for addressTypes are city, zipCode

Some examples are

http://localhost:3000/api/hello?name=harit

Production

Start Developing

  • Clone this repository (or better fork it so that you can make changes in your repo)
  • Run yarn start. This will kick-off vercel dev so that you can start developing your features
  • Run yarn test to run tests

About

Typescript implementation of a serverless API end point on Vercel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published