robb1e / content-api-nodejs-app Goto Github PK
View Code? Open in Web Editor NEWAn example of using NodeJS to hit the Guardian Content API and render a simple web page based on a query.
An example of using NodeJS to hit the Guardian Content API and render a simple web page based on a query.
Guardian Content API for NodeJS =============================== Setup ----- This example uses NodeJS and a number of dependencies to demonstrate a simple example of retrieving content from the Guardian Content API and present that in a web page. Dependencies are managed by [ndistro](https://github.com/visionmedia/ndistro) so should be easy to get started. Install ndistro as per instructions on that site and then run 'ndistro' on the command line. This will set up the following dependencies: - connect, a HTTP middleware library - expressjs, a lightweight web framework - ejs, a rendering engine for HTML - node-properties, a small library to externalise configuration Once ndisto has run the following directories will have been created: bin, lib and modules. NodeJS is now setup locally and relative to the directory you are currently in. Running ------- To run the web app, run the following command ./bin/node index.js If you have not changed any defaults, the web app will load on port 3000. Usage ----- You will be required to enter a name for your query and the URI for the query. You can get the query URI by going to the [Content API Explorer](http://explorer.content.guardianapis.com). Sign up for an account (without one, you can't get HTML from the API required for this app) and use the 'content' tab to build your query. Notes ----- There is no persistence in this application, so when you start the app no queries will have been remembered.
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.