- main
- server
- upstream
- location
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
{ | |
"apps": [ | |
{ | |
/* General */ | |
"name": "my-api", /* (string) application name (default to script filename without extension) */ | |
"script": "index.js", /* (string) script path relative to pm2 start */ | |
"cwd": "/var/www/", /* (string) the directory from which your app will be launched */ | |
"args": "-a 13 -b 12", /* (string) string containing all arguments passed via CLI to script */ | |
"interpreter": "/usr/bin/python", /* (string) interpreter absolute path (default to node) */ | |
"interpreter_args": "--harmony", /* (string) option to pass to the interpreter */ |
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
/* Basic example of save cookie using axios in node.js and recreate session if it expired. | |
* Get/save cookie manually cause WithCredential axios param use XHR and not work in node.js | |
* Supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
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 chai = require("chai"); | |
const chaiHttp = require("chai-http"); | |
const expect = chai.expect | |
const baseUrl = "https://store-ordering-api.herokuapp.com" | |
// const baseUrl = "localhost:3200/" | |
chai.use(chaiHttp); | |
describe("Food Ordering API Unit Test", function(){ | |
var token; |
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
#!/usr/bin/env python | |
# coding: utf8 | |
# Script to create superset users | |
import pandas as pd | |
from sqlalchemy import create_engine | |
import datetime | |
import pexpect | |
import os |
Installation Docs:
# Download
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"