Skip to content

dignite/harvest-report-lambda

Repository files navigation

Harvest Report Lambda

Serverless framework functions to expose time reporting data to clients as JSON. Currently this project assumes invoicing in swedish crowns.

AWS Lambda - Serverless MIT

100% coverage code style: prettier ESLint


Table of Contents


Getting started with Local Development 💻

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Pre-requisites

Installing and Running

First, install third party dependencies

npm install

Set up the .env file with proper values

cp .env.example .env
code .env # or alternative editor

Start the project locally

npm run start

You should now have the project running on http://localhost:3000! ✨

Quality Assurance

This project relies heavily on unit tests with jest and has 100% coverage! Additionally prettier helps with code style consistency and ESLint guides some code style decisions.

Run the tests by running one of

npm run test
npm run test -- --watch
npm run test -- --watch --notify

Check the code style by running

npm run lint

Fix the code style issues manually or together with the following command

npm run lint:fix

Deployment 🌩️

To set up a deployment on AWS you need an AWS account.

Pre-requisites

Installing and Deploying

First, install third party dependencies

npm install

Set up the .env file with proper values

cp .env.example .env
code .env # or alternative editor

Configure AWS credentials in serverless.

npx serverless config credentials --provider aws --key AKIAIOSFODNN7EXAMPLE --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

To deploy both a dev environment and a prod environment, run

npm run deploy

(As an alternative you can run npm run deploy:dev or npm run deploy:prod)

Clean up

To remove everything that was set up on AWS, run

npm run remove-deploys

Built With 🛠️

  • Serverless - The most widely-adopted toolkit for building serverless applications
  • node-fetch - A light-weight module that brings window.fetch to Node.js, for consuming the Harvest API

Contributing 💗

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors ✒️

  • Daniel Edholm Ignat (dignite) - Initial work

See also the list of contributors who participated in this project.

License 📓

This project is licensed under the MIT License - see the LICENSE file for details.

About

Node.js serverless framework functions to expose time reporting data to clients.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages