Skip to content

BlinkTagInc/meter-made

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meter Made

XO code style

Description

Local setup

Install node.js and mongodb

On OS X, if you have brew installed:

brew install node
brew install mongodb

Install dependencies

yarn

Create a .env file

Create a file in the project root called .env.local. Setup values for MONGODB_URI, ADMIN_USERNAME, and ADMIN_PASSWORD.

MONGODB_URI=mongodb://127.0.0.1:27017/yoursurveydatabase
ADMIN_USERNAME=username
ADMIN_PASSWORD=securepassword
NEXT_PUBLIC_SAVE_RESPONSES=true

The ADMIN_USERNAME and ADMIN_PASSWORD are used for bulk .csv export of survey responses.

Start mongodb

mongod

In a new tab, run the app

yarn dev

Open your browser and visit:

http://localhost:3000

Exporting responses

While running the app, visit:

http://localhost:3000/responses.csv

The username and password are defined in the .env.local file.

License

This project is licensed under GNU General Public License v3.0.