Live Coding a JavaScript Poll App with Chris and Alex (1/2)



Watch part 2 with Chris: https://youtu.be/nL2wpZV1LYc
Subscribe to Chris’ YouTube channel: https://www.youtube.com/c/dev_coffee

Website we built: http://www.andvote.com/
Source code: https://github.com/andvote/andvote

▼ Follow me ▼

on Twitter: https://twitter.com/bookercodes
on GitHub: https://github.com/alexbooker

▼ Links I Mention in the Video (in the Order I Mention Them)▼

Joe https://github.com/karan/joe
ESLint http://eslint.org/
tmux https://tmux.github.io/
Babel https://babeljs.io/
Nodemon https://github.com/remy/nodemon
Sequelize http://docs.sequelizejs.com/en/latest/
My Sequelize course https://www.youtube.com/playlist?list=PL5ze0DjYv5DYBDfl0vF_VRxEu8JdTIHlR
sequelize-connect https://github.com/jspizziri/sequelize-connect
Redis: http://redis.io/
My shell aliases: https://github.com/alexbooker/dotfiles/blob/master/.aliases.sh
VimFiler: https://github.com/Shougo/vimfiler.vim
Postman: https://www.getpostman.com/
My friend Jerrie from ProCoder’s Postman course: https://www.youtube.com/playlist?list=PLq8ibqx-o5fcYN-v5cNqz8C_045W2VFis
Chalk: https://github.com/chalk/chalk

▼ Timestamps▼

For your convince, here are some timestamps:

00:00 Introduction
01:49 Initializing Git
02:32 Creating npm package.json
02:49 Setting up ESLint
04:17 Setting up Babel
07:30 Setting up a simple Express server
08:38 Setting up Nodemon npm script
10:11 Connecting to MySQL via Sequelize
12:50 Installing the Babel parser for ESLint
13:57 Setting up a one-to-many relationship between the poll and poll option tables
19:22 Creating the MySQL database via the MySQL command-line tool
20:54 Creating the poll controller
21:24 Handling poll submissions
29:48 Handling poll queries
33:10 Creating the vote controller
33:17 Setting up the vote model
35:47 Debugging the vote model
37:14 Handling vote submissions
39:58 Including votes in the poll query response
41:39 Coding a more efficient way to query poll votes
43:31 Prevent users from voting on the same poll more than once based on their remote IP
51:28 Creating an error handler middleware function
54:00 Setting up Chalk
54:56 Basic input validation
56:43 Uploading the code to GitHub
58:22 Conclusion

▼ Attribution ▼

Intro inspiration by Mackenzie Child https://www.youtube.com/user/mackenziechild

Emoji provided free by http://emojione.com

Sound effect provided free by http://freesound.org/people/edsward/sounds/341871/

Twitter and GitHub icons provided free by Freepik form http://www.flaticon.com

Link icon provided free by Dave Gandy from https://fortawesome.github.io/Font-Awesome/ via http://www.flaticon.com

Special thanks to Cruor (https://twitter.com/Cruor99) and Yngve Olsen Ranestad (github.com/piees) who helped me with a SQL query when preparing for this video.

source

Reply

Do NOT follow this link or you will be banned from the site!