Code Monkey home page Code Monkey logo

content-api-nodejs-app's Introduction

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. 

content-api-nodejs-app's People

Contributors

robb1e avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.