Skip to content

How to create a new endpoint? #3193

Closed Answered by qwerty541
yaten2302 asked this question in Q&A
Discussion options

You must be logged in to vote

@yaten2302 Pull request #3064 which i mentioned in my previous answer also contains new endpoint addition (file /api/gist.js). Every file inside api folder is a separate endpoint. To add your new endpoint you should simply add new file in this folder using any other file like example for retrieving query options and handling common errors. To view your changes locally, after adding new endpoint file and running vercel dev command to init development environment, you should open the following URL in browser: localhost:3000/api/{YOUR_ENDPOINT_FILE_NAME}?{QUERY_OPTIONS}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by yaten2302
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants