Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Coding Exercise for Pluralsight

NotificationsYou must be signed in to change notification settings

ushangt/PluralsightCodingExercise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tech Stack Used:

  • Backend: Node.js/Express/REST
  • Javascript Frontend: Node.js/Bootstrap Material/Jade
  • Database: sqlite3, Sequelize, (Ruby for initialization)

Steps to be followed after cloning the repo:

1. Install dependencies:

Make sure you haveNode JS andnpm installed. If you want to re-create the DB you will also needRuby installed.After that open Terminal at the project folder and hitnpm install

2. Load the Database:

The database related files are all in thedb folder. It has the challenegeCSV dump as well.The first step is to move thecsv file contents intosqlite3 database. It is done using a simpleRuby script. I amnot much of an expert on ruby and thus wrote some simple code. Anyways

cd db/seed and typeruby seed-sqlite.rb

This generates aplural-sight.sqlite3 database file in thedb folder.

3. Run in development mode:

Navigate back to the projectroot folder and type:

npm start and browsehttp://localhost:3000/ on any modern browser.

To check the api endpoints either usePOSTMAN orINSOMNIA.

RESTful API Enpoints:

  • GET:/api/question - Gets all the questions form the database
  • GET:/api/question/:id - Gets the question specified by theid
  • POST:api/question - Creates a new question & adds it to the database
  • PUT:/api/question/:id - Updates an existing question with the specifiedid

Example Body for POST & PUT calls:

{    "question" : "What is 400 * 4 ?",    "answer" : "1600",    "distractors" : "8000, 80"}

About

Coding Exercise for Pluralsight

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp