GithubHelp home page GithubHelp logo

jazz-serverless-job-applicant's Introduction

Serverless Jazz HR Connection

This function is deployed using the Serverless framework to AWS Lambda.

Because the v1 of Jazz's HR API can only be used in a server environment this function is the connection between the careers posted on Gatsbyjs.com and Gatsby's account on the Jazz portal.

What it does

The function in handler.js simply forwards the data received from the JazzHrForm component on .com on to Jazz's post applicant endpoint.

The API has some limitations like only being able to post to specific fields (custom fields and workflows defined by a user aren't "postable", of which we have several), meaning some fields get posted to other fields that are generally unused as a work around. What fields did and did not work were mostly ascertained by guess and check since it's not documented by Jazz.

Deploying

First, verify that you have added a .env file at the root of the project with the API keys for Jazz and Sendgrid:

GATSBY_JAZZHR_KEY=r4nd0mjumbledch4rs
SENDGRID_API_KEY=SG.r4nd0mjumbledch4rs.evenM0aRch4rs

The whole function can be deployed after installing serverless globally with:

serverless deploy

The above command will deploy to a dev environment on Lambda. To deploy to prod use:

serverless deploy --stage prod

A successful deployment will return a message like this:

Service Information
service: jazz
stage: prod
region: us-east-1
stack: jazz-prod
resources: 17
api keys:
  None
endpoints:
  POST - https://a8wsdc02xk.execute-api.us-east-1.amazonaws.com/prod/postApplication

The endpoint is what is hit by .com to send the form data for an applicant to the function.

If you have made updates to the serverless.yml file you need to use the above commands, but if you want to deploy changes to a function, like the postApplication function in handler.js, you can run:

serverless deploy --stage prod --function postApplication

Which would be deployed to prod because of the --stage flag.

Developing

The function can be invoked locally, and you can pass in mock data from a file like data.json with this command:

serverless invoke local --function postApplication --path data.json

jazz-serverless-job-applicant's People

Contributors

gillkyle avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.