Skip to content

Commit

Permalink
website: Attempt serverless function usage
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Oct 28, 2020
1 parent 05d9934 commit 1e8d39f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/website/api/twitter-auth.js
@@ -0,0 +1,6 @@
import {NowRequest, NowResponse} from '@vercel/node';

export default (request: NowRequest, response: NowResponse) => {
const {name = 'World'} = request.query;
response.status(200).send(`Hello ${name}!`);
};
3 changes: 3 additions & 0 deletions vercel.json
@@ -0,0 +1,3 @@
{
"builds": [{"src": "src/website/api/*.js", "use": "@vercel/node"}]
}

1 comment on commit 1e8d39f

@vercel
Copy link

@vercel vercel bot commented on 1e8d39f Oct 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.