Fix elm-live instructions.

This commit is contained in:
Richard Feldman
2018-05-04 20:53:24 -04:00
parent 9054122539
commit b21108bcad
106 changed files with 30 additions and 12 deletions

View File

@@ -58,15 +58,18 @@ of the workshop, so **don't close it** until the workshop is over!
Leave the existing terminal running, and open a **second** terminal. Leave the existing terminal running, and open a **second** terminal.
In the new termnal, `cd` into the `elm-workshop` directory again. In the new termnal, `cd` into the `elm-workshop/server/` directory again.
Then run this to build the Elm code for the first time: Then run this to build the Elm code for the first time:
```shell ```shell
elm-live Main.elm --output=server/public/elm.js --pushstate --open elm-live src/Main.elm --output=../server/public/elm.js --dir=../server/public --pushstate
``` ```
A browser should open, and you should see this in it: > It should say "Server running at" and "LiveReload running on" - but we'll ignore both of those, because we'll instead be using the server we already started running in the previous step!
Leave `elm-live` running and open [http://localhost:3000](http://localhost:3000)
in your browser. You should see this in it:
<img width="375" alt="A screenshot showing “Youre all set!”" src="https://user-images.githubusercontent.com/1094080/39399636-63605a72-4aef-11e8-82bc-2b94e85369d1.png"> <img width="375" alt="A screenshot showing “Youre all set!”" src="https://user-images.githubusercontent.com/1094080/39399636-63605a72-4aef-11e8-82bc-2b94e85369d1.png">

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

View File

@@ -32,9 +32,9 @@ viewBanner =
-} -}
div [ class "banner" ] div [ class "banner" ]
[ div [ class "container" ] [ div [ class "container" ]
[] [ text "hi" ]
] ]
viewFeed = viewFeed =
div [ class "feed-toggle" ] [ text "(Well display some articles here later.)" ] div [ class "feed-toggle" ] [ text "(Well display some articles here later!!!!)" ]

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

View File

@@ -3,4 +3,4 @@ module Request.Helpers exposing (apiUrl)
apiUrl : String -> String apiUrl : String -> String
apiUrl str = apiUrl str =
"http://localhost:3000/api" ++ str "/api" ++ str

15
server/elm-package.json Normal file
View File

@@ -0,0 +1,15 @@
{
"version": "1.0.0",
"summary": "helpful summary of your project, less than 80 characters",
"repository": "https://github.com/user/project.git",
"license": "BSD3",
"source-directories": [
"."
],
"exposed-modules": [],
"dependencies": {
"elm-lang/core": "5.1.1 <= v < 6.0.0",
"elm-lang/html": "2.0.0 <= v < 3.0.0"
},
"elm-version": "0.18.0 <= v < 0.19.0"
}

Some files were not shown because too many files have changed in this diff Show More