Skip to content

Instantly share code, notes, and snippets.

@PauloLuan
Created October 23, 2013 18:16
Show Gist options
  • Save PauloLuan/7123760 to your computer and use it in GitHub Desktop.
Save PauloLuan/7123760 to your computer and use it in GitHub Desktop.
Slides 5 JUG Vale.
Slides! :D
Ringo is a CommonJS-based JavaScript runtime written in Java and based on the Mozilla Rhino JavaScript engine. It takes a pragmatical and non-dogmatic stance on things like I/O paradigms. Blocking and asynchronous I/O both have their strengths and weaknesses in different areas.
http://ringojs.org/
http://ringojs.org/documentation/
====================================================================================
# HowTo
git clone https://github.com/ringo/ringojs.git
cd ringojs/
ant
ant update && ant compile
./bin/ringo
nano ~/.bashrc #linux
nano ~/.bash_profile #mac
export PATH="$PATH:/Users/funcatemobile/Desktop/jug-ringo/ringojs/bin/"
# igual apt-get ;D
====================================================================================
# Imprimindo os slides
var fs = require('fs');
var file = fs.read('slides.txt');
print(file);
====================================================================================
# Criando app com o ringo-admin
./ringojs/bin/ringo-admin create jug-teste
cd jug-teste
tree
../ringojs/bin/ringo main.js
====================================================================================
# [IMPORTANTE] e como fazer deploy? Tchaaanaaaaaaam, repositórios que criei.
# diferenciais: dependências via Maven. Deploy mais fácil. Debug via ant.
git clone https://github.com/PauloLuan/ringo-maven.git
ant
mvn2 clean install
cp target/ringo-maven.war ~/Documents/Desenvolvimento/Tomcat/apache-tomcat-7.0.32/webapps/
# waaaaar
# publicação do war no Tomcat. Produção!
# existiam alguns, mas não tão interessantes.
====================================================================================
git clone https://github.com/PauloLuan/ringo-socialauth.git
# mostrar bizu do /etc/hosts/
====================================================================================
Crud com MongoDB usando Java Driver!
git clone https://github.com/PauloLuan/ringo-mongodb.git
====================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment