Coder Social home page Coder Social logo

results-example's Introduction

results-example

This is an example application which utilizes the Typeform authentication mechanism, and also calls the responses API to plot the simple forms data.

The application has two main enpoints:

  • / โ€” an index page which provides an interface to log in and log out actions;
  • /results/:id โ€” a page which plots the graph for the particular form identified by the :id parameter (for example /results/urFORM will display the plot for the form identified by urFORM).

Getting started

Deploy to Heroku

You can deploy your application to Heroku in one click using the button below and following the instructions.

Deploy

Development

Requirements

  • More or less recent versions of Node.js and NPM installed
  • Heroku CLI client (needed if you plan to work with Heroku)

Installation

To install the application and its dependencies:

$ git clone https://github.com/Typeform/results-example.git

$ cd results-example
$ npm install

Running

To run the application you would need to setup some environment variables. The easiest way is to create a .env file and then export it's contents before running the application:

$ cat .env
TYPEFORM_API_BASE_URL=https://api.typeform.com
APPLICATION_URL=http://localhost:5000

CLIENT_ID=<your_client_id>
CLIENT_SECRET=<your_client_secret>

$ export $(cat .env)

And finally to run the application:

$ npm start

[Re-]deploying to Heroku

In order to be able to deploy your changes to Heroku, you need to add a Heroku remote to your git repository:

$ heroku git:remote -a <your_heroku_application_name>

To deploy the changes to Heroku just push them to the heroku remote:

$ git push heroku master

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.