Typeform / results-example

Results API example
MIT License
26 stars 18 forks source link
type-other typeform typeform-api use-nonproduction

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 endpoints:

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

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 main

Legal

Copyright 2017 Typeform SL. under the MIT License; see the LICENSE file for more information.

This is not an official Typeform product.