danepod / express-hypermedia Goto Github PK
View Code? Open in Web Editor NEWA library that offers the creation of hypermedia resources that works in tandem with express
A library that offers the creation of hypermedia resources that works in tandem with express
Siren Actions need to implement one execute() Method because in Siren, the user defines an Action per Resource and HTTP Method.
On the other hand, CJ Actions (called Templates/Queries) are defined per Resource and can contain multiple handlers for HTTP Methods. So CJ Actions need to implement executePOST()/executePUT(), executeDELETE(), etc. methods.
The goal is to find a middle ground to unify creating actions that removes these differences between the output formats. Streamlining these makes it easier for users of the library to understand the usage of these interfaces.
Rename Resource and Representation to better reflect the meaning of the terms proposed by Roy Fielding (https://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm, 5.2.11 and 5.2.12).
When doing this, remove all instructions to the manual installation from README.
Due to a bug that prevents the build from succeeding, 8175e53 set the version of TypeScript to be used for TravisCI builds to 2.6.2. This is the latest known stable version to successfully build express-hypermedia.
I've tested the most recent development version of TypeScript, 2.8.0-dev.20180202, which was able to build the project again after small changes. Because this is an unstable development version, I don't want to use this yet and rather wait for a fix to arrive in the stable build.
What needs to be done: Wait for the next stable version of TypeScript to be released, check if the build succeeds and then revert the aforementioned commit.
Express has a way of setting these headers to set navigational affordances (https://expressjs.com/en/4x/api.html#res.links).
At the moment, the Content-Type header of every response generated by express-hypermedia
reads application/json. While technically correct, the more appropriate value would be the MIME type of the actual used hypermedia format, such as application/vnd.siren+json.
Using Response.format(), Express provides a solution to content negotiation which could be used with this library as well.
My own implementation, while unit-tested, may not handle every edge-case according to RFC 7231.
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.