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
service: | |
name: quick-api-with-webtask | |
provider: | |
name: webtasks | |
environment: | |
RETHINKDB_SERVER: "${env:RETHINKDB_SERVER, opt:rethinkdb-server, self:provider.defaults.RETHINKDB_SERVER}" | |
defaults: | |
RETHINKDB_SERVER: "127.0.0.1" |
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
$ npm i -g serverless | |
$ serverless create --template webtasks-nodejs --path quick-webtask-api-demo |
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/env bash | |
set -e | |
# Start Xvfb | |
Xvfb -ac -screen scrn 1280x800x24 :9.0 & | |
export DISPLAY=:9.0 | |
exec "$@" |
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
FROM node:7 | |
RUN apt-get update &&\ | |
apt-get install -y libgtk2.0-0 libgconf-2-4 \ | |
libasound2 libxtst6 libxss1 libnss3 xvfb | |
# Exposing port 5000 (micro) | |
EXPOSE 5000 | |
WORKDIR /app |
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 r = require('rethinkdb'), | |
_ = require('lodash'); | |
var debug = process.env.DEBUG || false; | |
var dbConfig = { | |
host: process.env.RDB_HOST || 'localhost', | |
port: parseInt(process.env.RDB_PORT) || 28015, | |
db : process.env.RDB_DB || 'geo', | |
tables: { |
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
package mx.org.cloud9.h2_rethink; | |
import com.rethinkdb.RethinkDB; | |
import com.rethinkdb.gen.ast.Db; | |
import com.rethinkdb.gen.ast.Insert; | |
import com.rethinkdb.gen.ast.Table; | |
import com.rethinkdb.model.MapObject; | |
import com.rethinkdb.net.Connection.Builder; | |
import java.io.PrintStream; | |
import java.sql.DriverManager; |
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
<VirtualHost *:80> | |
DocumentRoot /var/www/vhosts.d/hostname.cloud9.mx/webroot | |
ServerName hostname.cloud9.mx | |
ServerAlias hostname-alias.cloud9.mx | |
ErrorLog logs/hostname-error_log | |
CustomLog logs/hostname-access_log common | |
<Directory /var/www/vhosts.d/hostname/webroot> | |
Options +Indexes +ExecCGI +FollowSymLinks | |
DirectoryIndex index.php index.html index.htm |
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
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port that | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
#ServerName www.example.com |
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
<Directory "/"> | |
Options Indexes MultiViews FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
<Virtualhost *:80> | |
VirtualDocumentRoot "/Users/eromero/Workspace" | |
ServerName home.dev |
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
$(document).on("click", ".eliminar", function (e) { | |
e.preventDefault(); | |
var parent = $(this).parents().get(0); | |
$(parent).remove(); | |
}); |