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
// Hello world example in nodejs | |
//writen by jayco | |
// Create server variable and assign it the node http module | |
var http_server = require('http'); |
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
/* Create the new server: | |
Create server and pass it an anonymous function as the argument. | |
The reason for this is that the function will be | |
called whenever there is a new request to the webserver. The function is | |
directly attached to the new webservers (http_server) event listener for | |
the request event that is passed. | |
*/ | |
http_server.createServer( |
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
/* log to the console: | |
This allows us to log the output to the console for development purposes, | |
no different to how it is done in browser oriented javascript | |
*/ | |
console.log('server running at http://127.0.0.1:8124/'); |
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
#install dev packages | |
sudo apt-get install g++ curl libssl-dev apache2-utils | |
#if you haven't already installed git | |
sudo apt-get install git-core |
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
#enter in repo | |
git clone git://github.com/joyent/node.git | |
#navigate into folder | |
cd node | |
#run the configure executable | |
./configure | |
#run the make file |
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
#clone the nvm from here | |
git clone git://github.com/creationix/nvm.git ~/nvm | |
#then source it and add it to you bash shell in $HOME/.bashrc: | |
. ~/nvm/nvm.sh | |
#then install | |
nvm install 0.6.16 | |
#make sure you specify to use it |
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
#Install sourcemint | |
npm install -g sm | |
#Install cloud9 in the /opt directory | |
cd /opt | |
#Then clone the cloud9 git repo | |
git clone https://github.com/ajaxorg/cloud9.git cloud9 | |
#navigate to downloaded directory |
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
#navigate to directory | |
cd /opt/cloud9 | |
#to run cloud9 | |
bin/cloud9.sh | |
#or to point it to a directory and run it | |
bin/cloud9.sh -w ~/workspace/node_project |
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
steps: | |
- label: get meta data | |
env: | |
REPO_NAME: "" | |
commands: | |
- 'echo $$REPO_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
steps: | |
- command: "true" | |
concurrency_group: "gate" | |
concurrency: 1 | |
key: "gate" | |
- wait | |
- label: "build" | |
command: > |
OlderNewer