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 application_root = __dirname, | |
express = require("express"), | |
path = require("path"), | |
mongoose = require('mongoose'); | |
var app = express.createServer(); | |
// database | |
mongoose.connect('mongodb://localhost/ecomm_database'); |
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
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
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
{ | |
"name": "playground", | |
"description": "Simple app with expressjs, mongoose and angularjs", | |
"author": "Ricardo Negri <riconegri@gmail.com>", | |
"dependencies": { | |
"colors": "0.x.x", | |
"express": "3.x.x", | |
"optimist": "0.2.x" | |
}, | |
"devDependencies": { |
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
"use strict"; | |
var mongoose = require('mongoose'), | |
Schema = mongoose.Schema; | |
// ==== connect to database ==== | |
mongoose.connect('mongodb://localhost/temp'); | |
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
<div class="ui-header ui-bar-a ui-header-fixed slidedown" role="banner"> | |
<div data-role="navbar" class="ui-navbar ui-mini" role="navigation"> | |
<ul class="ui-grid-c"> | |
<li class="ui-block-a"> | |
<a class="ui-btn ui-btn-inline ui-btn-up-a"> | |
<span class="ui-btn-inner"><span class="ui-btn-text">word of world</span></span> | |
</a> | |
</li> | |
</ul> | |
</div> |
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
{ | |
acessoId: [11111111,2222222,333333,4444444], //ligação com os documentos de analytics | |
nome:"Gerusa Dias", | |
login: "gerusadias@globo.com", | |
comportamento: [ | |
{ | |
turnoAcessado:{manha: "30%",tarde: "10%",noite: "60%"}, | |
tempoMedioSessao: "50 minutos" | |
} | |
], |
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
res.mailer.send('mail/register', { | |
to: 'riconegri@gmail.com', | |
subject: 'Aviso de cadastro efetuado', | |
user: user | |
}, function (err) { | |
if (err) { | |
console.log(err); | |
res.send('There was an error sending the email'); | |
return; | |
} |
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
{ | |
"estados": [ | |
{ | |
"sigla": "AC", | |
"nome": "Acre", | |
"cidades": [ | |
"Acrelândia", | |
"Assis Brasil", | |
"Brasiléia", | |
"Bujari", |
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 json = { | |
"div": { | |
"_style": "backgroung-color:#DC0600", | |
"_class": "btn btn-default", | |
"inner": { | |
span: { | |
_class: "warning", | |
inner: "bacana" | |
}, | |
b: { |
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
<template> | |
<require from="./list"></require> | |
<list items.bind="items"></list> | |
</template> |
OlderNewer