ssaadh / ats-netlify-express

A few [serverless] urls/endpoints to access API endpoints that won't work with a front-end only site.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReadMe

Deploy to Netlify

This fork from https://github.com/neverendingqs/netlify-express includes a few additional endpoints.

One is for working with an OAuth 2 Redux auth implementation focused for the front-end with implicit granting. It also allows for authorization code granting which means a backend endpoint is needed for POSTING with the temporary code recieved to get the access token. That endpoint is: /auth-code.

@TODO Example url:

POST https://atsexpress.atextbooksituation.com/.netlify/functions/server/auth-code

Two other endpoints are for working with Status Hero's API. The endpoints are GET and POST to /statushero/v1.

@TODO Example urls:

GET https://atsexpress.atextbooksituation.com/.netlify/functions/server/statushero/v1/
POST https://atsexpress.atextbooksituation.com/.netlify/functions/server/statushero/v1/

The default url examples:

curl https://atsexpress.atextbooksituation.com/.netlify/functions/server
curl https://atsexpress.atextbooksituation.com/.netlify/functions/server/another
curl --header "Content-Type: application/json" --request POST --data '{"json":"POST"}' https://atsexpress.atextbooksituation.com/.netlify/functions/server

The library/npm package this was made for is: https://github.com/noicouldalwaysturn2u/oauth2-redux-implicit-authcode

Previous ReadMe:

From https://github.com/neverendingqs/netlify-express

Express.js on Netlify Example

An example of how to host an Express.js app on Netlify using serverless-http. See express/server.js for details, or check it out at https://netlify-express.netlify.com/!

index.html simply loads html from the Express.js app using <object>, and the app is hosted at /.netlify/functions/server. Examples of how to access the Express.js endpoints:

curl https://netlify-express.netlify.com/.netlify/functions/server
curl https://netlify-express.netlify.com/.netlify/functions/server/another
curl --header "Content-Type: application/json" --request POST --data '{"json":"POST"}' https://netlify-express.netlify.com/.netlify/functions/server

About

A few [serverless] urls/endpoints to access API endpoints that won't work with a front-end only site.

License:Apache License 2.0


Languages

Language:JavaScript 99.0%Language:HTML 1.0%