andrewsuzuki / elm-todo-rest-api Goto Github PK
View Code? Open in Web Editor NEWModular, heavily-documented Elm todo app with a json rest api
Modular, heavily-documented Elm todo app with a json rest api
If you create a todo like this:
POST /todos
{
"title": "1234",
…
}
The response will be:
{
"title": 1234,
…
}
This breaks the todoDecoder, which expects title
to be a string. Even more confusingly, the Result.Err
from FetchAllDone
and CreateDone
are discarded as well. Maybe consider reporting upstream and/or making a more type-friendly API.
Set up a gh-pages branch with a demo site.
Use programWithFlags along with webpack environment variables to substitute the local endpoint for http://jsonplaceholder.typicode.com/todos
. It mostly works as-is, except (1) it isn't persistent, (2) POSTs always return the same id, so only one todo can be created, and (3) it's pretty slow. Better than nothing though.
Greetings!
Not sure you're interested, but I wanted to mess around with this app to see a working Elm client with a JSON API, and also wanted to learn the differences in Elm 0.19. I forked and upgraded, a bit with elm-upgrade
and then some code changes to accommodate the things it couldn't upgrade for me. If you're interested I can either submit a PR or just grab it if you'd like.
Cheers!
I cloned this repository, run npm run api
and npm run dev
, but it's throwing an error.
app.js:7535 Uncaught Error: Cannot find module "./Main.elm"webpackMissingModule @ app.js:7535(anonymous function) @ app.js:7535__webpack_require__ @ app.js:20(anonymous function) @ app.js:48__webpack_require__ @ app.js:20(anonymous function) @ app.js:40(anonymous function) @ app.js:43
app.js:99 [WDS] Errors while compiling.
app.js:101 C:\Users\lluis\Source\Repos\elm-todo-rest-api-master\elm-todo-rest-api-master\node_modules\elm-webpack-loader\node_modules\node-elm-compiler\worker.js:96
errorMessage += `
^
Unexpected token ILLEGAL
@ ./src/index.js 7:10-31
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.