- By Burlywood
##Level subjects:
- HTML ✅
- CSS ✅
- JavaScript
- jQuery
- Node
- Mongo
- Mongoose
levels = [ {level} ]
level = {title: "level 1",
question: "string",
options: [{option}]
}
option = {content: "string",
isCorrect: boolean}{"title": "Level 1: HTML",
"question": "question_content",
"options": [{"content": "option_1_content",
"isCorrect": true},
{"content": "option_2_content",
"isCorrect": false},
{"content": "option_3_content",
"isCorrect": false}]
}- Initialize node application
- Install express, body-parser and mongoose
- Make a directory for data
- Start mongodb poitnted to data directory
npm init
npm install --save express body-parser mongoose prismjs
mkdir data
mongod --dbpath ./dataWith your mongo data base running in one terminal, open another with command-n, navigate to your local Know Your Code Full-stack folder and run server.js
- Set up development Environment
- In sublime, open hackathon/know-your-code-fullstack/public/levelmaker.html
- Insert level dependent information into divs (first answer div always contains correct answer)
- For options containing code blocks,
- Use https://tohtml.com/ to generate styled html and
- Insert styled html into answer divs
- Add font-size styleing depending on code block size
- Manualy add indentation on a line by line basis.
- In your browser, navagate to localhost:8000/levelmaker.html
- Visualy inspect render and make additional edits if needed
- Once satisfied with level, Click add level to save level to database.
- Finalize your levels collection using robomongo (delete unwanted levels/duplicates)
- Click save levels to json to export your levels into the leves.json file