This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "John Doe", | |
"label": "Programmer", | |
"picture": "", | |
"email": "john@gmail.com", | |
"phone": "(912) 555-4321", | |
"website": "http://johndoe.com", | |
"summary": "A summary of John Doe...", | |
"location": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express') | |
const path = require('path') | |
const app = express() | |
const rsvp = require('./rsvp') | |
app.set('view engine', 'html') | |
app.use('/', express.static(path.resolve(__dirname, 'public'))) | |
app.get('/', function (req, res) { | |
res.sendFile(path.resolve(__dirname, 'index.html')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const RSVP = require('./rsvp') | |
const sendgrid = require('sendgrid')(process.env.SENDGRID_API_KEY) | |
const htmlContent = function (url) { | |
return "<html>" + | |
"<head>" + | |
"<meta name='viewport' content='width=device-width, initial-scale=1'>" + | |
"</head>" + | |
"<body>" + | |
"Click <a href='" + url + "'>here</a> to confirm your presence :)" + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const RSVP = require('./rsvp') | |
const ID = function () { | |
return Math.random().toString(36).substr(2, 9) | |
} | |
const invites = [ | |
{ | |
email: 'name@gmail.com', | |
name: 'Name', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Invite = require('./invite') | |
module.exports = { | |
pending: function () { | |
return Invite.findAll({ | |
where: { | |
confirmed: false | |
} | |
}) | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Sequelize = require('sequelize') | |
const connection = null | |
module.exports = { | |
connect: function () { | |
if (connection) return connection | |
return new Sequelize(process.env.DATABASE_NAME, | |
process.env.DATABASE_USER, | |
process.env.DATABASE_PASSWORD, { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Sequelize = require('sequelize') | |
const sequelize = require('./connection').connect() | |
const Invite = sequelize.define('invite', { | |
url: Sequelize.STRING, | |
name: Sequelize.STRING, | |
confirmed: Sequelize.BOOLEAN, | |
email: Sequelize.STRING | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hit Ctrl + Alt + F1 | |
sudo apt-get update | |
sudo apt-get install linux-headers-generic | |
sudo apt-get dist-upgrade | |
-------------------- | |
If your linux was not installed from a cd, but instead from a stick, do this: |