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
function Person (name, surname) { | |
this.name = name; | |
this.surname = surname; | |
} | |
Person.prototype.showFullName = function () { | |
return this.name + ' ' + this.surname; | |
}; | |
function Employee (name, surname, company) { | |
this.company = company; |
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 request = require('supertest'); | |
var fs = require('fs'); | |
var reqData = { | |
title: 'Rahh!', | |
fileName: 'test-image.jpeg' | |
}; | |
var req = request(context.app) //context.app = your express object | |
.post('/v1/images') |
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
'use strict'; | |
module.exports = function(grunt) { | |
// Project Configuration | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
watch: { | |
js: { | |
files: ['gruntfile.js', 'server.js', 'app/**/*.js', 'public/js/**', 'test/**/*.js'], | |
tasks: ['jshint'], |
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'), | |
path = require('path'), | |
home = require('./routes/home.js'); | |
var app = express(); | |
app.configure(function() { | |
app.set('views', __dirname + '/views'); | |
app.set('view engine', 'jade'); | |
app.use(express.static(path.join(__dirname, 'public'))); |