Spaces:
Sleeping
Sleeping
Delete config
Browse files- config/jest/globalSetup.js +0 -6
- config/jest/globalTeardown.js +0 -3
- config/nginx/nginx.conf +0 -76
- config/pm2.json +0 -10
config/jest/globalSetup.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
| 1 |
-
const { MongoMemoryServer } = require("mongodb-memory-server");
|
| 2 |
-
|
| 3 |
-
module.exports = async function () {
|
| 4 |
-
global.__MONGO_MEMORY_SERVER_INSTANCE__ = await MongoMemoryServer.create();
|
| 5 |
-
process.env.MONGODB_URI = `mongodb://localhost:27017/boilerplate-test`;
|
| 6 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config/jest/globalTeardown.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
| 1 |
-
module.exports = async function () {
|
| 2 |
-
await global.__MONGO_MEMORY_SERVER_INSTANCE__.stop();
|
| 3 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
config/nginx/nginx.conf
DELETED
|
@@ -1,76 +0,0 @@
|
|
| 1 |
-
worker_processes auto;
|
| 2 |
-
worker_rlimit_nofile 100000;
|
| 3 |
-
worker_cpu_affinity auto;
|
| 4 |
-
events {
|
| 5 |
-
worker_connections 1024;
|
| 6 |
-
use epoll;
|
| 7 |
-
multi_accept on;
|
| 8 |
-
}
|
| 9 |
-
|
| 10 |
-
http {
|
| 11 |
-
proxy_cache_path /etc/nginx/cache levels=1:2 keys_zone=cache:8m max_size=1000m inactive=600m;
|
| 12 |
-
proxy_temp_path /etc/nginx/cache/tmp;
|
| 13 |
-
|
| 14 |
-
server {
|
| 15 |
-
listen 80;
|
| 16 |
-
server_name boilerplate-api;
|
| 17 |
-
|
| 18 |
-
access_log /dev/stdout;
|
| 19 |
-
error_log /dev/stdout error;
|
| 20 |
-
|
| 21 |
-
# gzip Compression
|
| 22 |
-
gzip on;
|
| 23 |
-
gzip_proxied any;
|
| 24 |
-
gzip_min_length 1000;
|
| 25 |
-
gzip_types application/json;
|
| 26 |
-
gzip_vary on;
|
| 27 |
-
|
| 28 |
-
# Keepalive and Timeouts
|
| 29 |
-
client_body_timeout 30;
|
| 30 |
-
client_header_timeout 30;
|
| 31 |
-
keepalive_timeout 30;
|
| 32 |
-
keepalive_requests 100000;
|
| 33 |
-
reset_timedout_connection on;
|
| 34 |
-
send_timeout 30;
|
| 35 |
-
|
| 36 |
-
# Proxy Settings
|
| 37 |
-
# Left as defaults
|
| 38 |
-
|
| 39 |
-
# File Descriptor cache
|
| 40 |
-
open_file_cache max=200000 inactive=20s;
|
| 41 |
-
open_file_cache_valid 30s;
|
| 42 |
-
open_file_cache_min_uses 2;
|
| 43 |
-
open_file_cache_errors on;
|
| 44 |
-
|
| 45 |
-
# Other Settings
|
| 46 |
-
client_max_body_size 0;
|
| 47 |
-
underscores_in_headers on;
|
| 48 |
-
tcp_nopush on;
|
| 49 |
-
tcp_nodelay on;
|
| 50 |
-
sendfile on;
|
| 51 |
-
|
| 52 |
-
location /nginx_status {
|
| 53 |
-
stub_status on;
|
| 54 |
-
access_log off;
|
| 55 |
-
}
|
| 56 |
-
|
| 57 |
-
location / {
|
| 58 |
-
proxy_ignore_headers "Set-Cookie";
|
| 59 |
-
proxy_hide_header "Set-Cookie";
|
| 60 |
-
|
| 61 |
-
proxy_cache cache;
|
| 62 |
-
proxy_cache_key $scheme$proxy_host$uri$is_args$args;
|
| 63 |
-
proxy_cache_valid 200 10m;
|
| 64 |
-
proxy_cache_bypass $arg_nocache;
|
| 65 |
-
|
| 66 |
-
add_header X-Cache-Status $upstream_cache_status;
|
| 67 |
-
|
| 68 |
-
proxy_set_header Host $host;
|
| 69 |
-
proxy_set_header X-Real-IP $remote_addr;
|
| 70 |
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
| 71 |
-
proxy_set_header X-Forwarded-Host $server_name;
|
| 72 |
-
proxy_pass http://app:8080;
|
| 73 |
-
}
|
| 74 |
-
|
| 75 |
-
}
|
| 76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
config/pm2.json
DELETED
|
@@ -1,10 +0,0 @@
|
|
| 1 |
-
{
|
| 2 |
-
"apps": [
|
| 3 |
-
{
|
| 4 |
-
"name": "Boilerplate-API",
|
| 5 |
-
"script": "./app/server.js",
|
| 6 |
-
"instances": "max",
|
| 7 |
-
"exec_mode": "cluster"
|
| 8 |
-
}
|
| 9 |
-
]
|
| 10 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|