From 487780fe5ad0080c91f29d23aaab34051e481c05 Mon Sep 17 00:00:00 2001 From: Claudia Meadows Date: Sat, 8 Jun 2024 12:42:04 -0700 Subject: [PATCH] Fix #2893 for gh-pages, pending long-term fix --- archive/v1.0.0/index.html | 4 ++-- archive/v1.0.0/simple-application.html | 16 ++++++++-------- archive/v1.0.1/index.html | 4 ++-- archive/v1.0.1/simple-application.html | 16 ++++++++-------- archive/v1.1.0-rc.1/index.html | 4 ++-- archive/v1.1.0-rc.1/simple-application.html | 16 ++++++++-------- archive/v1.1.0/index.html | 4 ++-- archive/v1.1.0/simple-application.html | 16 ++++++++-------- archive/v1.1.1/index.html | 4 ++-- archive/v1.1.1/simple-application.html | 16 ++++++++-------- archive/v1.1.2/index.html | 4 ++-- archive/v1.1.2/simple-application.html | 16 ++++++++-------- archive/v1.1.3/index.html | 4 ++-- archive/v1.1.3/simple-application.html | 16 ++++++++-------- archive/v1.1.4/index.html | 4 ++-- archive/v1.1.4/simple-application.html | 16 ++++++++-------- archive/v1.1.5/index.html | 4 ++-- archive/v1.1.5/simple-application.html | 16 ++++++++-------- archive/v1.1.6/index.html | 4 ++-- archive/v1.1.6/simple-application.html | 18 +++++++++--------- archive/v1.1.7/index.html | 4 ++-- archive/v1.1.7/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.0/index.html | 4 ++-- archive/v2.0.0-rc.0/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.1/index.html | 4 ++-- archive/v2.0.0-rc.1/prop.html | 6 +++--- archive/v2.0.0-rc.1/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.3/index.html | 4 ++-- archive/v2.0.0-rc.3/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.4/index.html | 4 ++-- archive/v2.0.0-rc.4/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.5/index.html | 4 ++-- archive/v2.0.0-rc.5/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.6/index.html | 4 ++-- archive/v2.0.0-rc.6/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.7/index.html | 4 ++-- archive/v2.0.0-rc.7/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.8/index.html | 4 ++-- archive/v2.0.0-rc.8/simple-application.html | 18 +++++++++--------- archive/v2.0.0-rc.9/index.html | 4 ++-- archive/v2.0.0-rc.9/simple-application.html | 18 +++++++++--------- archive/v2.0.1/index.html | 4 ++-- archive/v2.0.1/simple-application.html | 18 +++++++++--------- archive/v2.0.2/index.html | 4 ++-- archive/v2.0.2/simple-application.html | 18 +++++++++--------- archive/v2.0.3/index.html | 4 ++-- archive/v2.0.3/simple-application.html | 18 +++++++++--------- archive/v2.0.4/index.html | 4 ++-- archive/v2.0.4/index.md | 4 ++-- archive/v2.0.4/simple-application.html | 18 +++++++++--------- archive/v2.0.4/simple-application.md | 18 +++++++++--------- archive/v2.2.0/index.html | 6 +++--- archive/v2.2.0/simple-application.html | 18 +++++++++--------- archive/v2.2.1/index.html | 6 +++--- archive/v2.2.1/simple-application.html | 18 +++++++++--------- archive/v2.2.2/index.html | 6 +++--- archive/v2.2.2/simple-application.html | 18 +++++++++--------- index.html | 6 +++--- simple-application.html | 18 +++++++++--------- 59 files changed, 317 insertions(+), 317 deletions(-) diff --git a/archive/v1.0.0/index.html b/archive/v1.0.0/index.html index bfd458099..8d46c115d 100644 --- a/archive/v1.0.0/index.html +++ b/archive/v1.0.0/index.html @@ -211,13 +211,13 @@

Routing


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.0.0/simple-application.html b/archive/v1.0.0/simple-application.html
index e65c75da3..535ae0a3b 100644
--- a/archive/v1.0.0/simple-application.html
+++ b/archive/v1.0.0/simple-application.html
@@ -112,7 +112,7 @@ 

Simple application

module.exports = User
-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET http://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET http://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -121,7 +121,7 @@ 

Simple application

loadList: function() { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users", + url: "http://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -320,7 +320,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users", + url: "http://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -340,7 +340,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users", + url: "http://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -352,7 +352,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users/:id", + url: "http://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -434,7 +434,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users", + url: "http://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -446,7 +446,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "http://rem-rest-api.herokuapp.com/api/users/:id", + url: "http://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -458,7 +458,7 @@

Simple application

save: function() { return m.request({ method: "PUT", - url: "http://rem-rest-api.herokuapp.com/api/users/:id", + url: "http://mithril-rem.fly.dev/api/users/:id", data: User.current, withCredentials: true, }) diff --git a/archive/v1.0.1/index.html b/archive/v1.0.1/index.html index 346e5c546..eea99ef57 100644 --- a/archive/v1.0.1/index.html +++ b/archive/v1.0.1/index.html @@ -212,13 +212,13 @@

Routing


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.0.1/simple-application.html b/archive/v1.0.1/simple-application.html
index ce21314f3..d1794bbc1 100644
--- a/archive/v1.0.1/simple-application.html
+++ b/archive/v1.0.1/simple-application.html
@@ -112,7 +112,7 @@ 

Simple application

module.exports = User
-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -121,7 +121,7 @@ 

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -320,7 +320,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -340,7 +340,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -352,7 +352,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -439,7 +439,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -463,7 +463,7 @@

Simple application

save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.0-rc.1/index.html b/archive/v1.1.0-rc.1/index.html index bbef39ddf..782b918cd 100644 --- a/archive/v1.1.0-rc.1/index.html +++ b/archive/v1.1.0-rc.1/index.html @@ -212,13 +212,13 @@

Routing


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.0-rc.1/simple-application.html b/archive/v1.1.0-rc.1/simple-application.html
index 112ec7a1c..b2fed81d2 100644
--- a/archive/v1.1.0-rc.1/simple-application.html
+++ b/archive/v1.1.0-rc.1/simple-application.html
@@ -112,7 +112,7 @@ 

Simple application

module.exports = User
-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -121,7 +121,7 @@ 

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -320,7 +320,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -340,7 +340,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -352,7 +352,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -439,7 +439,7 @@

Simple application

loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application

load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -463,7 +463,7 @@

Simple application

save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.0/index.html b/archive/v1.1.0/index.html index b66d1b825..5cb33427f 100644 --- a/archive/v1.1.0/index.html +++ b/archive/v1.1.0/index.html @@ -212,13 +212,13 @@

Routing


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.0/simple-application.html b/archive/v1.1.0/simple-application.html
index dbc96f070..2f3eb2f26 100644
--- a/archive/v1.1.0/simple-application.html
+++ b/archive/v1.1.0/simple-application.html
@@ -111,7 +111,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -120,7 +120,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -319,7 +319,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -339,7 +339,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -351,7 +351,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -438,7 +438,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -450,7 +450,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -462,7 +462,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.1/index.html b/archive/v1.1.1/index.html index 9dc0c1cb9..bf66f03e1 100644 --- a/archive/v1.1.1/index.html +++ b/archive/v1.1.1/index.html @@ -235,13 +235,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.1/simple-application.html b/archive/v1.1.1/simple-application.html
index c61efd7e6..c3a3c7cfe 100644
--- a/archive/v1.1.1/simple-application.html
+++ b/archive/v1.1.1/simple-application.html
@@ -113,7 +113,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -122,7 +122,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -321,7 +321,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -341,7 +341,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -353,7 +353,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -440,7 +440,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -452,7 +452,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: {id: id}, withCredentials: true, }) @@ -464,7 +464,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/:id", + url: "https://mithril-rem.fly.dev/api/users/:id", data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.2/index.html b/archive/v1.1.2/index.html index a5c2e3be1..d43e6bdfc 100644 --- a/archive/v1.1.2/index.html +++ b/archive/v1.1.2/index.html @@ -235,13 +235,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.2/simple-application.html b/archive/v1.1.2/simple-application.html
index 96ccbb7ea..7c12f955f 100644
--- a/archive/v1.1.2/simple-application.html
+++ b/archive/v1.1.2/simple-application.html
@@ -113,7 +113,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -122,7 +122,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -321,7 +321,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -341,7 +341,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -353,7 +353,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -439,7 +439,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -462,7 +462,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.3/index.html b/archive/v1.1.3/index.html index d8126cd54..889d522d3 100644 --- a/archive/v1.1.3/index.html +++ b/archive/v1.1.3/index.html @@ -235,13 +235,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.3/simple-application.html b/archive/v1.1.3/simple-application.html
index 48c897764..2145779b5 100644
--- a/archive/v1.1.3/simple-application.html
+++ b/archive/v1.1.3/simple-application.html
@@ -113,7 +113,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -122,7 +122,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -321,7 +321,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -341,7 +341,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -353,7 +353,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -439,7 +439,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -462,7 +462,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.4/index.html b/archive/v1.1.4/index.html index 490ff1be4..5395c67fc 100644 --- a/archive/v1.1.4/index.html +++ b/archive/v1.1.4/index.html @@ -235,13 +235,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.4/simple-application.html b/archive/v1.1.4/simple-application.html
index 119cff1ce..fbc6f6fea 100644
--- a/archive/v1.1.4/simple-application.html
+++ b/archive/v1.1.4/simple-application.html
@@ -113,7 +113,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -122,7 +122,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -321,7 +321,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -341,7 +341,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -353,7 +353,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -439,7 +439,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -462,7 +462,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.5/index.html b/archive/v1.1.5/index.html index 78af1702f..54d22a06f 100644 --- a/archive/v1.1.5/index.html +++ b/archive/v1.1.5/index.html @@ -235,13 +235,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.5/simple-application.html b/archive/v1.1.5/simple-application.html
index 7e503b8e3..c207ff1e9 100644
--- a/archive/v1.1.5/simple-application.html
+++ b/archive/v1.1.5/simple-application.html
@@ -113,7 +113,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -122,7 +122,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -321,7 +321,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -341,7 +341,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -353,7 +353,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -439,7 +439,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -451,7 +451,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -462,7 +462,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.6/index.html b/archive/v1.1.6/index.html index df2c5fba9..2928f3d3f 100644 --- a/archive/v1.1.6/index.html +++ b/archive/v1.1.6/index.html @@ -238,13 +238,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.6/simple-application.html b/archive/v1.1.6/simple-application.html
index f2a11cb2d..6c5195d1d 100644
--- a/archive/v1.1.6/simple-application.html
+++ b/archive/v1.1.6/simple-application.html
@@ -64,7 +64,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -117,7 +117,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -126,7 +126,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -326,7 +326,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -358,7 +358,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -456,7 +456,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -467,7 +467,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v1.1.7/index.html b/archive/v1.1.7/index.html index 0501af4a6..472259e3f 100644 --- a/archive/v1.1.7/index.html +++ b/archive/v1.1.7/index.html @@ -238,13 +238,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v1.1.7/simple-application.html b/archive/v1.1.7/simple-application.html
index f61c9b947..f97ad8dd9 100644
--- a/archive/v1.1.7/simple-application.html
+++ b/archive/v1.1.7/simple-application.html
@@ -64,7 +64,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -117,7 +117,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -126,7 +126,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -326,7 +326,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -358,7 +358,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -456,7 +456,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -467,7 +467,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.0/index.html b/archive/v2.0.0-rc.0/index.html index 2ae7866c4..11123118e 100644 --- a/archive/v2.0.0-rc.0/index.html +++ b/archive/v2.0.0-rc.0/index.html @@ -238,13 +238,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.0/simple-application.html b/archive/v2.0.0-rc.0/simple-application.html
index 8d42fc1d3..ec29b7b58 100644
--- a/archive/v2.0.0-rc.0/simple-application.html
+++ b/archive/v2.0.0-rc.0/simple-application.html
@@ -64,7 +64,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -117,7 +117,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -126,7 +126,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -326,7 +326,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -358,7 +358,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -456,7 +456,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -467,7 +467,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.1/index.html b/archive/v2.0.0-rc.1/index.html index be239517d..1a2de77b3 100644 --- a/archive/v2.0.0-rc.1/index.html +++ b/archive/v2.0.0-rc.1/index.html @@ -238,13 +238,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.1/prop.html b/archive/v2.0.0-rc.1/prop.html
index fa9b023c8..e03ee5769 100644
--- a/archive/v2.0.0-rc.1/prop.html
+++ b/archive/v2.0.0-rc.1/prop.html
@@ -193,7 +193,7 @@ 

Sending th User.load = function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -209,7 +209,7 @@

Sending th User.save = function(user) { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + user.id, + url: "https://mithril-rem.fly.dev/api/users/" + user.id, data: { id: user.id, firstName: user.firstName.get(), @@ -223,7 +223,7 @@

Sending th User.save = function(user) { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + user.id, + url: "https://mithril-rem.fly.dev/api/users/" + user.id, data: user, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.1/simple-application.html b/archive/v2.0.0-rc.1/simple-application.html index 92ee6168b..c448e67c2 100644 --- a/archive/v2.0.0-rc.1/simple-application.html +++ b/archive/v2.0.0-rc.1/simple-application.html @@ -64,7 +64,7 @@

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -117,7 +117,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -126,7 +126,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -326,7 +326,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -358,7 +358,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -456,7 +456,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -467,7 +467,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.3/index.html b/archive/v2.0.0-rc.3/index.html index d9ab98367..afbc780c3 100644 --- a/archive/v2.0.0-rc.3/index.html +++ b/archive/v2.0.0-rc.3/index.html @@ -238,13 +238,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.3/simple-application.html b/archive/v2.0.0-rc.3/simple-application.html
index 17cf74bdc..07707e2d6 100644
--- a/archive/v2.0.0-rc.3/simple-application.html
+++ b/archive/v2.0.0-rc.3/simple-application.html
@@ -64,7 +64,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -117,7 +117,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -126,7 +126,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -326,7 +326,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -358,7 +358,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -456,7 +456,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -467,7 +467,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.4/index.html b/archive/v2.0.0-rc.4/index.html index e03b4d8c1..62a4a9a85 100644 --- a/archive/v2.0.0-rc.4/index.html +++ b/archive/v2.0.0-rc.4/index.html @@ -240,13 +240,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.4/simple-application.html b/archive/v2.0.0-rc.4/simple-application.html
index 67b933a49..000dfa86e 100644
--- a/archive/v2.0.0-rc.4/simple-application.html
+++ b/archive/v2.0.0-rc.4/simple-application.html
@@ -65,7 +65,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -118,7 +118,7 @@ 

Simple application module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -127,7 +127,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -327,7 +327,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -347,7 +347,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -359,7 +359,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -445,7 +445,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -457,7 +457,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -468,7 +468,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.5/index.html b/archive/v2.0.0-rc.5/index.html index 31d9a9437..6626ba489 100644 --- a/archive/v2.0.0-rc.5/index.html +++ b/archive/v2.0.0-rc.5/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.5/simple-application.html b/archive/v2.0.0-rc.5/simple-application.html
index 676274fa8..4b0096e54 100644
--- a/archive/v2.0.0-rc.5/simple-application.html
+++ b/archive/v2.0.0-rc.5/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -123,7 +123,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -308,7 +308,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -327,7 +327,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -339,7 +339,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -421,7 +421,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -433,7 +433,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.6/index.html b/archive/v2.0.0-rc.6/index.html index 636dc44b8..698ec5744 100644 --- a/archive/v2.0.0-rc.6/index.html +++ b/archive/v2.0.0-rc.6/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), data is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         data: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.6/simple-application.html b/archive/v2.0.0-rc.6/simple-application.html
index 773ff2aa3..e5eb80b6f 100644
--- a/archive/v2.0.0-rc.6/simple-application.html
+++ b/archive/v2.0.0-rc.6/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -123,7 +123,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -308,7 +308,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -327,7 +327,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -339,7 +339,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -421,7 +421,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -433,7 +433,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -444,7 +444,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, data: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.7/index.html b/archive/v2.0.0-rc.7/index.html index e8f6d33da..6c5fba3dd 100644 --- a/archive/v2.0.0-rc.7/index.html +++ b/archive/v2.0.0-rc.7/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.7/simple-application.html b/archive/v2.0.0-rc.7/simple-application.html
index 11b6868ef..73a24fbde 100644
--- a/archive/v2.0.0-rc.7/simple-application.html
+++ b/archive/v2.0.0-rc.7/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -123,7 +123,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -315,7 +315,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -334,7 +334,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -431,7 +431,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -443,7 +443,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -454,7 +454,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, body: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.8/index.html b/archive/v2.0.0-rc.8/index.html index af8d7b218..313c0570e 100644 --- a/archive/v2.0.0-rc.8/index.html +++ b/archive/v2.0.0-rc.8/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.8/simple-application.html b/archive/v2.0.0-rc.8/simple-application.html
index 502301aaa..007ac7ebc 100644
--- a/archive/v2.0.0-rc.8/simple-application.html
+++ b/archive/v2.0.0-rc.8/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -123,7 +123,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -315,7 +315,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -334,7 +334,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -431,7 +431,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -443,7 +443,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -454,7 +454,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, body: User.current, withCredentials: true, }) diff --git a/archive/v2.0.0-rc.9/index.html b/archive/v2.0.0-rc.9/index.html index cb1c1702b..6004ac59e 100644 --- a/archive/v2.0.0-rc.9/index.html +++ b/archive/v2.0.0-rc.9/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.0-rc.9/simple-application.html b/archive/v2.0.0-rc.9/simple-application.html
index ac1bb10b5..7a6ff025f 100644
--- a/archive/v2.0.0-rc.9/simple-application.html
+++ b/archive/v2.0.0-rc.9/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that covers some of the major aspects of Single Page Applications

-

An interactive running example can be seen here flems: Simple Application

+

An interactive running example can be seen here flems: Simple Application

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

// src/models/User.js
 var m = require("mithril")
 
@@ -123,7 +123,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -315,7 +315,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -334,7 +334,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -346,7 +346,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -431,7 +431,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -443,7 +443,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -454,7 +454,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, body: User.current, withCredentials: true, }) diff --git a/archive/v2.0.1/index.html b/archive/v2.0.1/index.html index fa0dd294d..1e12b1b00 100644 --- a/archive/v2.0.1/index.html +++ b/archive/v2.0.1/index.html @@ -227,13 +227,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.1/simple-application.html b/archive/v2.0.1/simple-application.html
index 017c0a947..a0a8a2b76 100644
--- a/archive/v2.0.1/simple-application.html
+++ b/archive/v2.0.1/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application } module.exports = User

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -124,7 +124,7 @@ 

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -371,7 +371,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -390,7 +390,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -402,7 +402,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -487,7 +487,7 @@

Simple application loadList: function() { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users", + url: "https://mithril-rem.fly.dev/api/users", withCredentials: true, }) .then(function(result) { @@ -499,7 +499,7 @@

Simple application load: function(id) { return m.request({ method: "GET", - url: "https://rem-rest-api.herokuapp.com/api/users/" + id, + url: "https://mithril-rem.fly.dev/api/users/" + id, withCredentials: true, }) .then(function(result) { @@ -510,7 +510,7 @@

Simple application save: function() { return m.request({ method: "PUT", - url: "https://rem-rest-api.herokuapp.com/api/users/" + User.current.id, + url: "https://mithril-rem.fly.dev/api/users/" + User.current.id, body: User.current, withCredentials: true, }) diff --git a/archive/v2.0.2/index.html b/archive/v2.0.2/index.html index 0b956774b..a3da840f3 100644 --- a/archive/v2.0.2/index.html +++ b/archive/v2.0.2/index.html @@ -220,13 +220,13 @@

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.2/simple-application.html b/archive/v2.0.2/simple-application.html
index 855a2926a..d229fb8e1 100644
--- a/archive/v2.0.2/simple-application.html
+++ b/archive/v2.0.2/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -124,7 +124,7 @@ 

Simple application

Simple application

Simple application

Simple application

Simple application

Simple application

Simple application

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.3/simple-application.html b/archive/v2.0.3/simple-application.html
index 5108c96e1..6272bacef 100644
--- a/archive/v2.0.3/simple-application.html
+++ b/archive/v2.0.3/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -124,7 +124,7 @@ 

Simple application

Simple application

Simple application

Simple application

Simple application

Simple application

Simple application

Live Example


XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
diff --git a/archive/v2.0.4/index.md b/archive/v2.0.4/index.md
index bdc67ce1b..b6bd5a277 100644
--- a/archive/v2.0.4/index.md
+++ b/archive/v2.0.4/index.md
@@ -253,7 +253,7 @@ Also, as you would expect, clicking on the link on the splash page takes you to
 
 Basically, XHR is just a way to talk to a server.
 
-Let's change our click counter to make it save data on a server. For the server, we'll use [REM](https://rem-rest-api.herokuapp.com), a mock REST API designed for toy apps like this tutorial.
+Let's change our click counter to make it save data on a server. For the server, we'll use [REM](https://mithril-rem.fly.dev), a mock REST API designed for toy apps like this tutorial.
 
 First we create a function that calls `m.request`. The `url` specifies an endpoint that represents a resource, the `method` specifies the type of action we're taking (typically the `PUT` method [upserts](https://en.wiktionary.org/wiki/upsert)), `body` is the payload that we're sending to the endpoint and `withCredentials` means to enable cookies (a requirement for the REM API to work)
 
@@ -262,7 +262,7 @@ var count = 0
 var increment = function() {
 	m.request({
 		method: "PUT",
-		url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+		url: "//mithril-rem.fly.dev/api/tutorial/1",
 		body: {count: count + 1},
 		withCredentials: true,
 	})
diff --git a/archive/v2.0.4/simple-application.html b/archive/v2.0.4/simple-application.html
index 4200ce446..ce4171224 100644
--- a/archive/v2.0.4/simple-application.html
+++ b/archive/v2.0.4/simple-application.html
@@ -66,7 +66,7 @@ 

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -114,7 +114,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -124,7 +124,7 @@ 

Simple application

Simple application

Simple applicationSimple applicationSimple applicationSimple applicationSimple applicationLive Example

XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
@@ -333,7 +333,7 @@ 

Live Example

var increment = function() { m.request({ method: "PUT", - url: "//rem-rest-api.herokuapp.com/api/tutorial/1", + url: "//mithril-rem.fly.dev/api/tutorial/1", body: {count: count + 1}, withCredentials: true, }) diff --git a/archive/v2.2.0/simple-application.html b/archive/v2.2.0/simple-application.html index 8f3024b4b..97503c4d6 100644 --- a/archive/v2.2.0/simple-application.html +++ b/archive/v2.2.0/simple-application.html @@ -69,7 +69,7 @@

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -122,7 +122,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -132,7 +132,7 @@ 

Simple application

Simple applicationSimple applicationSimple applicationSimple applicationSimple applicationSimple applicationLive Example

XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
@@ -333,7 +333,7 @@ 

Live Example

var increment = function() { m.request({ method: "PUT", - url: "//rem-rest-api.herokuapp.com/api/tutorial/1", + url: "//mithril-rem.fly.dev/api/tutorial/1", body: {count: count + 1}, withCredentials: true, }) diff --git a/archive/v2.2.1/simple-application.html b/archive/v2.2.1/simple-application.html index 82c4a46cd..641c6e3f0 100644 --- a/archive/v2.2.1/simple-application.html +++ b/archive/v2.2.1/simple-application.html @@ -69,7 +69,7 @@

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -122,7 +122,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -132,7 +132,7 @@ 

Simple application

Simple applicationSimple applicationSimple applicationSimple applicationSimple applicationSimple applicationLive Example

XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
@@ -333,7 +333,7 @@ 

Live Example

var increment = function() { m.request({ method: "PUT", - url: "//rem-rest-api.herokuapp.com/api/tutorial/1", + url: "//mithril-rem.fly.dev/api/tutorial/1", body: {count: count + 1}, withCredentials: true, }) diff --git a/archive/v2.2.2/simple-application.html b/archive/v2.2.2/simple-application.html index 2720d1786..0de3efc80 100644 --- a/archive/v2.2.2/simple-application.html +++ b/archive/v2.2.2/simple-application.html @@ -69,7 +69,7 @@

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -122,7 +122,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -132,7 +132,7 @@ 

Simple application

Simple applicationSimple applicationSimple applicationSimple applicationSimple applicationSimple applicationLive Example

XHR

Basically, XHR is just a way to talk to a server.

-

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

+

Let's change our click counter to make it save data on a server. For the server, we'll use REM, a mock REST API designed for toy apps like this tutorial.

First we create a function that calls m.request. The url specifies an endpoint that represents a resource, the method specifies the type of action we're taking (typically the PUT method upserts), body is the payload that we're sending to the endpoint and withCredentials means to enable cookies (a requirement for the REM API to work)

var count = 0
 var increment = function() {
     m.request({
         method: "PUT",
-        url: "//rem-rest-api.herokuapp.com/api/tutorial/1",
+        url: "//mithril-rem.fly.dev/api/tutorial/1",
         body: {count: count + 1},
         withCredentials: true,
     })
@@ -333,7 +333,7 @@ 

Live Example

var increment = function() { m.request({ method: "PUT", - url: "//rem-rest-api.herokuapp.com/api/tutorial/1", + url: "//mithril-rem.fly.dev/api/tutorial/1", body: {count: count + 1}, withCredentials: true, }) diff --git a/simple-application.html b/simple-application.html index 2720d1786..0de3efc80 100644 --- a/simple-application.html +++ b/simple-application.html @@ -69,7 +69,7 @@

Simple application

Let's develop a simple application that shows off how to do most of the major things you would need to deal with while using Mithril.

-

An interactive example of the end result can be seen here

+

An interactive example of the end result can be seen here

First let's create an entry point for the application. Create a file index.html:

<!doctype html>
 <html>
@@ -122,7 +122,7 @@ 

Simple application

-

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://rem-rest-api.herokuapp.com/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

+

Then we can add an m.request call to make an XHR request. For this tutorial, we'll make XHR calls to the REM API, a mock REST API designed for rapid prototyping. This API returns a list of users from the GET https://mithril-rem.fly.dev/api/users endpoint. Let's use m.request to make an XHR request and populate our data with the response of that endpoint.

Note: third-party cookies may have to be enabled for the REM endpoint to work.

// src/models/User.js
 var m = require("mithril")
@@ -132,7 +132,7 @@ 

Simple application

Simple applicationSimple applicationSimple applicationSimple applicationSimple applicationSimple application