This file contains hidden or 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
| 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 |
This file contains hidden or 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'), | |
| 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...'); |
This file contains hidden or 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 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/'); |
This file contains hidden or 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": "wine-cellar", | |
| "description": "Wine Cellar Application", | |
| "version": "0.0.1", | |
| "private": true, | |
| "dependencies": { | |
| "express": "3.x" | |
| } | |
| } |
This file contains hidden or 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
| "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()); |