Skip to content

FullStack-Templates/NodeJSLambda-template

Repository files navigation

Financial Market Feed Node.js CI DeployLambda

Tech Stack service aws-lambda service aws-lambda service aws-lambda service aws-lambda service aws-lambda service aws-lambda

This project is a NestJS microservice for publishing a Financial Market Feed. Some of markets supported are:

  • Daily stock market prices
  • Daily Option market prices
  • Daily CrypoCurrency prices

This project is a hobby project and not meant to be used for business purposes. The tech stack used are:

  • Node.js as the JavaScript runtime
  • Nest.js as the Node.js web applications framework
  • AWS Lambda for executing the project as a serverless application
  • Terraform as the Infrastructure As Code (IaC) tool for provisioning and managing AWS resources
  • GitHub Actions as the CI/CD tool

Project Dependencies

To build and run this project, you'll need the following tools.

Build the Application

To build your application for the first time, run the following in your shell:

foo@bar:~$: cd api 
foo@bar:~$: npm install
foo@bar:~$: npm run build-local

Run this application as a Nest.js application

To run this application for the first time, run the following in your shell:

  • Assuming the you are in the api folder
foo@bar:~$: npm run start:debug
[12:58:55 PM] Starting compilation in watch mode...

[12:59:10 PM] Found 0 errors. Watching for file changes.

Debugger listening on ws://127.0.0.1:9229/a3e42d8c-d364-48ab-812a-e22356effea3
For help, see: https://nodejs.org/en/docs/inspector
[Nest] 23089   - 05/08/2021, 12:59:13 PM   [NestFactory] Starting Nest application...
[Nest] 23089   - 05/08/2021, 12:59:13 PM   [InstanceLoader] AppModule dependencies initialized +78ms
[Nest] 23089   - 05/08/2021, 12:59:13 PM   [RoutesResolver] AppController {}: +201ms
[Nest] 23089   - 05/08/2021, 12:59:13 PM   [RouterExplorer] Mapped {/hello, GET} route +4ms
[Nest] 23089   - 05/08/2021, 12:59:13 PM   [NestApplication] Nest application successfully started +3ms

Open up the browser to http://127.0.0.1:3000/hello to invoke the service.

Run the Application as a serverless lambda application

To run this application for the first time, run the following in your shell:

foo@bar:~$: cd .. 
foo@bar:~$: sam local start-api
Mounting FinancialMarketApi at http://127.0.0.1:3000/{proxy+} [DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT]
You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. You only need to restart SAM CLI if you update your AWS SAM template
2021-05-08 12:51:49  * Running on http://127.0.0.1:3000/ (Press CTRL+C to quit)

Open up the browser to http://127.0.0.1:3000/hello to invoke the service.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published