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
//During the test the env variable is set to test | |
process.env.NODE_ENV = 'test'; | |
//Require the dev-dependencies | |
const chai = require('chai'); | |
const chaiHttp = require('chai-http'); | |
const serverUrl = 'http://localhost:3000'; | |
const expect = chai.expect; | |
chai.use(chaiHttp); |
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
{ | |
"scripts": { | |
"start": "node server.js", | |
"dev": "supervisor --inspect server.js", | |
"test": "NODE_ENV=test mocha -u tdd --timeout 999999 --colors ./test --exit", | |
"pm2": "pm2 reload ecosystem.config.js" | |
} | |
} |
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
module.exports = { | |
apps: [ | |
{ | |
name: 'api.domain.com', | |
script: 'server.js', | |
output: './logs/api.console.log', | |
error: './logs/api.error.log', | |
log_type: 'json', | |
log_date_format: 'DD-MM-YYYY', | |
env: { |
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
require 'mina/bundler' | |
require 'mina/rails' | |
require 'mina/git' | |
require 'mina/deploy' | |
set :application_name, 'NodeJS API' | |
set :domain, 'your-domain.com' | |
set :deploy_to, '/home/public/your-domain/api' | |
set :repository, 'ssh://[email protected]/organization-name/project.git' | |
set :branch, 'dev' |
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
<div id="charts"></div> |
NewerOlder