- The
vercel
CLI:npm i -g vercel@latest
Note: Right now this example does not use the local source files in the serverless functions inside
api/
since, at the time of this writing, vercel dev
does not support symlinked packages or
local dependencies.
- Install the latest version of the main package as a dep to this example:
yarn add netlify-cms-oauth-provider-node@latest
- Create a
.env
file in this directory with the following contents, filling inOAUTH_CLIENT_ID
andOAUTH_CLIENT_SECRET
with your GitHub OAuth app's ID and secret. Also ensure that your GitHub OAuth app's callback URL matchesCOMPLETE_URL
.DEBUG=netlify-cms-oauth-provider-node* COMPLETE_URL=http://localhost:3000/api/complete OAUTH_CLIENT_ID= OAUTH_CLIENT_SECRET= NODE_ENV=development OAUTH_PROVIDER=github ORIGIN=localhost:3000
- If you've forked this repository, update
config.yml
with your repo. Otherwise you will be in a read-only mode OR the login will fail since you (probably) won't have write access to this package's repository. - Run the dev server:
yarn start
- Visit the local dev server at (likely)
http://localhost:3000