/lts-stack

A modern stack consisting of Lambda, Turbolinks & StimulusJS.

Primary LanguageJavaScriptMIT LicenseMIT

LTSstack

A modern stack consisting of Lambda, Turbolinks & StimulusJS. Also containig Typescript & Tailwaind. 🤷‍♂️

Installation

Install the dependencies & hydrate the Lambda functions, which are managed by Architect.

$ npm install
$ npx arc hydrate

Running the dev-server

Start the dev-server & visit localhost:3333/ in your browser.

$ npm start

Writing tests

Tests are run by Jest and there are two types of them: those for StimulusJS components, executed in a JSDOM env, and those for the Lambda handlers, executed in a Node env.

Testing StimulusJS components

These tests leverage the @testing-library/dom and render the accompanying HTML into the JSDOM. Have a look at assets/javascript/__tests__/guestbook-form-controller.test.ts to get an idea.

Testing Lambda handler

These tests simply call the handler function with an example request object and check the returned result. Have a look at server/http/get-index/test.ts to get an idea.

The idea

<tbd>