/Sumo-Survey

Primary LanguageJavaScript

Code Challenge

This app grabs a random question for a user to answer and displays metrics for the admin

Set up

Edit the following code to connect to the appropriate database with the correct dialect

//  models/index.js
var sequelize = new Sequelize('dbname', 'username', 'password', {
  host: 'localhost',
  port: 3306,
  dialect: 'postgresql | mysql | sqlite'
});

Install dependencies

npm install
npm start

Shut down your server and remove this line, which creates the tables

// models/index.js
sqlObj.Question.sync({force: true});

Run this command again and the app will be up and running. Click on 'Admin' in the browser to navigate to the dashboard and create new questions.

npm start