Skip to content

Instantly share code, notes, and snippets.

View jackfiallos's full-sized avatar
👾
experienced developer

Jack Fiallos jackfiallos

👾
experienced developer
View GitHub Profile
//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);
{
"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"
}
}
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: {
@jackfiallos
jackfiallos / deploy.rb
Last active August 22, 2018 19:02
Mina deploy configuration file
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'
@jackfiallos
jackfiallos / index.html
Last active August 20, 2018 20:48
React + D3 Bubble Chart
<div id="charts"></div>