Skip to content

Instantly share code, notes, and snippets.

View iwa4's full-sized avatar

p3 iwa4

  • Sansan, Inc.
  • Kyoto, Japan
View GitHub Profile
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see http://redis.io/download)
$ yum install make gcc tcl
$ cd /usr/local/src
var express = require('express'),
wines = require('./routes/wines');
var app = express();
app.get('/wines', wines.findAll);
app.get('/wines/:id', wines.findById);
app.listen(3000);
console.log('Listening on port 3000...');
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(3000, '127.0.0.1');
console.log('Server running at http://127.0.0.1:3000/');
{
"name": "wine-cellar",
"description": "Wine Cellar Application",
"version": "0.0.1",
"private": true,
"dependencies": {
"express": "3.x"
}
}
@iwa4
iwa4 / server.js
Last active December 19, 2015 13:48 — forked from ccoenraets/server.js
"use strict";
var express = require('express')
, wine = require('./routes/wines');
var app = express();
app.configure(function () {
app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */
app.use(express.bodyParser());