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'); | |
| var router = express.Router(); | |
| var Poemas = require('../models/poemas'); | |
| /* GET home page. */ | |
| app.get('/', function (req, res) { | |
| Poemas.find({}, function (err, docs) { | |
| res.json(Poemas); |
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 app = angular.module('app', []); | |
| app.controller("Controller", function($http,$scope){ | |
| $http.get("/").then(function(poemas){ | |
| $scope.title = "O Trovador"; | |
| $scope.poemas = poemas; |
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'); | |
| var router = express.Router(); | |
| var Poemas = require('../models/mpoemas'); | |
| var Categorias = require('../models/mcategorias'); | |
| var poema; | |
| var categoria; | |
| /* GET home page. */ | |
| router.get('/', function (req, res) { |
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'); | |
| var router = express.Router(); | |
| var Poemas = require('../models/mpoemas'); | |
| var Categorias = require('../models/mcategorias'); | |
| /* GET home page. */ | |
| router.get('/', function (req, res) { |
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'); | |
| var load = require('express-load'); | |
| var app = express(); | |
| load('models') | |
| .then('controllers') | |
| .then('routes') | |
| .into(app); | |
| app.set('views', __dirname + '/views'); |
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
| /home/alexandre/projetos/ntalk/node_modules/express/lib/router/index.js:140 | |
| var search = 1 + req.url.indexOf('?'); | |
| ^ | |
| TypeError: Cannot read property 'indexOf' of undefined | |
| at Function.handle (/home/alexandre/projetos/ntalk/node_modules/express/lib/router/index.js:140:27) | |
| at Object.router (/home/alexandre/projetos/ntalk/node_modules/express/lib/router/index.js:46:12) | |
| at /home/alexandre/projetos/ntalk/node_modules/express-load/lib/express-load.js:242:19 | |
| at iterate (/home/alexandre/projetos/ntalk/node_modules/async/lib/async.js:131:13) | |
| at /home/alexandre/projetos/ntalk/node_modules/async/lib/async.js:142:25 |
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'); | |
| var router = express.Router(); | |
| var categorias = require('../models/categorias'); | |
| /* o erro esta nesse get */ | |
| router.get('/', function (req, res) { | |
| res.render('index'); |
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
| #!/bin/env node | |
| // OpenShift sample Node application | |
| var express = require('express'); | |
| var path = require('path'); | |
| var mongoose = require('mongoose'); // usa o modulo mongoose | |
| var mongodb = require('./config/mongodb'); | |
| var app = express(); | |
| var site = require('./routes/site'); | |
| var poemas = require('./routes/poemas'); |
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'); | |
| var router = express.Router(); | |
| var categoria = require('../models/categorias'); | |
| /* GET home page. */ | |
| router.get('/list', function (req, res) { | |
| categoria.find({}, function (err, docs) { |
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'); | |
| var router = express.Router(); | |
| var session = require('express-session'); | |
| var admin = require('../models/admin'); | |
| var sess; | |
| /* GET home page. */ |