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
<!doctype html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1, maximum-scale=1" /> | |
<meta charset="utf-8" /> | |
<title><%= title %></title> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" /> | |
</head> | |
<body> |
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
*private.js | |
*.old | |
node_modules/ | |
.idea/ |
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
The MIT License (MIT) | |
Copyright (c) <year> <copyright holders> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
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
var express = require('express'), | |
path = require('path'), | |
app = express(); | |
require('./server/config/app-config')(express, path, app); | |
require('./server/routes')(app); | |
app.listen(process.env.port, function() { | |
console.log('Now listenting to requests'); | |
}); |
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
{ | |
"name": "nodejs-app-development", | |
"description": "An introduction to building web applications with Node.js", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "node app.js" | |
}, | |
"dependencies": { | |
"path": "~0.4.9", |
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
module.exports = function(express, path, app) { | |
var root = path.normalize(__dirname + '../../../'); | |
app.configure(function() { | |
app.use(express.logger('dev')); // log all requests to the console | |
app.use(express.cookieParser()); // enable reading of cookies | |
app.use(express.json({ limit: '50mb' })); // set json request payload size | |
app.use(express.urlencoded({ limit: '50mb' })); // set query request payload size | |
app.use(express.static(path.join(root, 'public'))); // set relative site root | |
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
Router = function(app) { | |
var homeOptions = { | |
title: 'Node.js', | |
subtitle: 'Web Application Development', | |
description: 'An introduction to web application development with Node.js' | |
}; | |
app.get('/', function(req, res) { | |
console.log('Request rendered'); | |
res.render('index', homeOptions); |
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
Router = function(app) { | |
return { | |
Home: require('./home')(app) | |
}; | |
}; | |
module.exports = Router; |
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
https://api.github.com/users/[USER_NAME]/repos |
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
#!/usr/bin/perl | |
#fetch Gravatars | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use Digest::MD5 qw(md5_hex); | |
my $size = 90; |
OlderNewer