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
const gulp = require('gulp'); | |
const spawn = require('child_process').spawn; | |
let node; | |
function server() { | |
if (node) { | |
node.kill(); | |
} | |
node = spawn('npm', ['run', 'runserver'], {stdio: 'inherit'}); | |
node.on('close', function (code) { |
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
process.env.NODE_ENV = 'test'; | |
const chai = require('chai'); | |
const should = chai.should(); | |
const chaiHttp = require('chai-http'); | |
chai.use(chaiHttp); | |
const server = require('../../src/app.js'); | |
describe('routes : index', () => { |
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
// replace LS_ITEM_NAME with your localstorage item name | |
// REACT_APP_BACKEND_HOST | |
// server should accept custom header "x-access-token" | |
export const AuthVerify = async () => { | |
const token = localStorage.getItem(LS_ITEM_NAME); | |
if (!token) { | |
return Promise.reject(false); | |
} | |
return axios.request({ |
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
<?php | |
if (!defined('BASEPATH')) { | |
exit('No direct script access allowed'); | |
} | |
class Business extends Front_Controller { | |
public function __construct() { | |
parent::__construct(); |