Git Product home page Git Product logo

mes-microservices-starter-template's Introduction

mes-microservices-starter-template

A serverless microservice template.

Structure

All serverless functions live in dedicated directories in src/functions. Code that is common between multiple functions should reside in src/common.

As per the principles of Hexagonal Architecture, each function has the following directories to help us separate concerns:

  • framework - contains all Inbound and Outbound Adapters, and all use of external/proprietary APIs - depends upon...
  • application - contains all Inbound and Outbound Ports, doesn't use any external/proprietary APIs - depends upon...
  • domain - contains all domain objects (Aggregates, Objects, Value classes etc) with all "business logic" (not just anaemic data holders), doesn't use any external/proprietary APIs.

Run locally

Use the following script to spin up the microservice locally

npm start

Build

To build a zip file for every function to build/artifacts, run:

npm run package

To build a subset of the functions, pass a comma separated list of function names, like so:

npm run package -- get,set

N.b. The build requires jq.

Any functions delcared in serverless.yml that contain the word "local" will be ignored in the packaging process.

Test

To run the unit tests, simply run:

npm test

Testing workflows locally

To run the GitHub actions locally for testing purposes, please see here:

https://github.com/nektos/act

mes-microservices-starter-template's People

Contributors

matthew2564 avatar ammarhaiderbjss avatar tombillingtonuk avatar dependabot[bot] avatar ali-campbell avatar calvin-j avatar rstepnowski avatar chrisnappin avatar mgoldson avatar

Stargazers

 avatar

Watchers

Shaun Hare avatar James Cloos avatar Edward Wilson avatar Michał Piątek avatar Ricky Walker avatar Przemek Sempruch avatar Natalie avatar Ahmed avatar  avatar  avatar  avatar

Forkers

uk-gov-mirror

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.