sebastiansandqvist / mithril-examples

https://mithril-examples.firebaseapp.com/
24 stars 4 forks source link

Enable dev setup for local testing #2

Closed barryels closed 7 years ago

barryels commented 7 years ago

Currently, running the npm start script yields a sh: 1: firebase: not found error. One quick-fix would be to add firebase-tools to devDependencies. (I've never had much fun with global deps ;) Running npm start then yields Error: HTTP Error: 401, The entered credentials were incorrect. Which makes sense... each firebase app has its owner and such.

I'm thinking http-server might be a simple solution to getting a local dev server running.

barryels commented 7 years ago

Something like this:

https://github.com/barryels/mithril-examples/commit/5100d1485d9b295e46626910d7a8c0c872c31ef4

sebastiansandqvist commented 7 years ago

This is a good idea. I prefer to run it with firebase-tools directly since that is how it will be deployed, so that the local version runs with the same config and settings as the live version.

sebastiansandqvist commented 7 years ago

If you want to add that change in a pull request you're welcome to. Otherwise, I'm refactoring parts of this project this weekend and can include that in my changes.

barryels commented 7 years ago

Thank @sebastiansandqvist !

I've fetch / merged from your master and made the package.json changes. I'm going to be working on this project for a while, so won't be too active here for a week or so.

sebastiansandqvist commented 7 years ago

Should be fixed now by using superstatic instead of firebase for the local server.

barryels commented 7 years ago

Yup, it works! :)