Skip to content
This repository was archived by the owner on Dec 21, 2018. It is now read-only.

Commit 45b0126

Browse files
authored
Merge pull request #13 from TechforgoodCAST/http-codealong
Http codealong
2 parents 801727b + b382caa commit 45b0126

File tree

6 files changed

+69
-4
lines changed

6 files changed

+69
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
elm-stuff
22
elm.js
3+
part3/http-workshop/Solutions.elm

part1/syntax-workshop/elm-package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"version": "1.0.0",
3-
"summary": "Like GitHub, but for Elm stuff.",
4-
"repository": "https://github.com/rtfeldman/elm-workshop.git",
3+
"summary": "Exercises for learning Elm syntax",
4+
"repository": "https://github.com/TechforgoodCAST/elm-week.git",
55
"license": "BSD-3-Clause",
66
"source-directories": [
7-
".",
8-
".."
7+
"."
98
],
109
"exposed-modules": [],
1110
"dependencies": {

part3/http-workshop/Main.elm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module Main exposing (..)
2+
3+
import Html exposing (..)
4+
5+
6+
main : Html msg
7+
main =
8+
text "hello world"

part3/http-workshop/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Http code-along
2+
3+
# Objectives
4+
5+
* Become familiar with the step by step process required to make a Http request in Elm
6+
* Understand how Elm handles failures in the outside world
7+
* Start practicing how to decode incoming Json into Elm datatypes
8+
9+
## Steps
10+
11+
1. Read through https://guide.elm-lang.org/architecture/effects/, up to the Random section.
12+
2. Go to https://github.com/settings/tokens and generate yourself a new token. Put it in a safe place!
13+
3. Get ready for some code-along fun!
14+
15+
## Tips
16+
17+
* Be careful with Elm package versions. It is always safer to go to http://package.elm-lang.org/ and search on there rather than on google. Searching for them on google often takes you to an outdated version.
18+
19+
## Building
20+
21+
```bash
22+
elm-live Main.elm --open --pushstate --output=elm.js
23+
```
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "1.0.0",
3+
"summary": "",
4+
"repository": "https://github.com/TechforgoodCAST/elm-week.git",
5+
"license": "BSD-3-Clause",
6+
"source-directories": [
7+
"."
8+
],
9+
"exposed-modules": [],
10+
"dependencies": {
11+
"elm-lang/core": "5.0.0 <= v < 6.0.0",
12+
"elm-lang/html": "2.0.0 <= v < 3.0.0",
13+
"elm-lang/http": "1.0.0 <= v < 2.0.0"
14+
},
15+
"elm-version": "0.18.0 <= v < 0.19.0"
16+
}

part3/http-workshop/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE HTML>
2+
<html>
3+
4+
<head>
5+
<meta charset="UTF-8">
6+
<title>Syntax workshop</title>
7+
<script type="text/javascript" src="/elm.js"></script>
8+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/tachyons/4.8.1/tachyons.min.css" />
9+
</head>
10+
11+
<body>
12+
</body>
13+
14+
<script type="text/javascript">
15+
var app = Elm.Main.fullscreen();
16+
</script>
17+
18+
</html>

0 commit comments

Comments
 (0)