the-sett / elm-serverless

Deploy an elm HTTP API to AWS Lambda using serverless
MIT License
43 stars 6 forks source link

Make it possible to run demo examples standalone #4

Closed MartinSStewart closed 3 years ago

MartinSStewart commented 4 years ago

The demo folder currently relies on NPM packages in the root folder. It's difficult to figure out which packages are necessary, which are nice to have, and which are only for internal use.

Additionally, I'm unable to get the examples to work outside of this repo without also including src and src-bridge. src is needed because the elm-serverless package uses an old version of elm/http which conflicts with my project. src-bridge is needed because when I try to run the demos after installing the NPM package I get an error message that elm-serverless can't be found.

This is probably me screwing up something with NPM but it would better if the demo examples were already configured to use the NPM package rather than the local files. Also, while it isn't as big of an issue, it would be better if the demo used the elm-serverless elm package rather than the local files for it.

rupertlssmith commented 4 years ago

I think this is a good idea.

In the Elm 0.18 version of this, the demo examples were duplicated in the main repo and also in a standalone repo. This is because the tests actually run and verify the demos.

I never bothered to reproduce the standalone repo since I did not want to duplicate the demos without a reason.

But I think it would be good to:

  1. Put the demos in a standalone repo that folk can just npm install && npm start on, and be confident of getting the demo live.

  2. Put a link to the standalone repo at the top of the REAME.md

MartinSStewart commented 4 years ago

Also having stand alone examples means we don't need to second guess as much if any bugs I'm running into are caused by elm-serverless or just me breaking stuff when personally making the examples stand alone.

rupertlssmith commented 4 years ago

The demos have been copied into a new repo:

https://github.com/the-sett/elm-serverless-demo

Getting them running on localhost should be as simple as:

npm install
npm start
rupertlssmith commented 4 years ago

Re-opening as I forgot to add information on where to find the demos to the readme.

rupertlssmith commented 3 years ago

Linked in the docs.