cd \mongodbdir\
mkdir db1
mkdir db2
mkdir db3
mongod --dbpath ./db1 --port 30000 --replSet "demo"
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman | |
Exec=postman | |
Icon=/opt/Postman/resources/app/assets/icon.png | |
Terminal=false | |
Type=Application | |
Categories=Development; |
{ | |
"editor.tabSize": 2, | |
"workbench.colorTheme": "Monokai", | |
"editor.fontFamily": "'DejaVu Sans Mono', 'Courier New', monospace, 'Droid Sans Fallback'", | |
"window.zoomLevel": 0, | |
"files.exclude": { | |
"**/.git": true, | |
"**/.svn": true, | |
"**/.hg": true, | |
"**/CVS": true, |
# Setup local MongoDB Replica Set for development. | |
DB_ROOT ?= /tmp | |
DB1_PATH ?= ${DB_ROOT}/db1 | |
DB2_PATH ?= ${DB_ROOT}/db2 | |
DB3_PATH ?= ${DB_ROOT}/db3 | |
DB1_PORT ?= 30000 | |
DB2_PORT ?= 40000 | |
DB3_PORT ?= 50000 |
[Unit] | |
Description=PM2 process manager | |
Documentation=https://pm2.keymetrics.io/ | |
After=network.target | |
[Service] | |
Type=forking | |
User=ubuntu | |
LimitNOFILE=infinity | |
LimitNPROC=infinity |
# Reference: https://github.com/pypa/sampleproject/blob/master/setup.py | |
from setuptools import setup, find_packages | |
def requirements(): | |
"""Returns packages required by current project.""" | |
reqs = [] | |
with open('requirements.txt', 'r') as f: | |
for line in f: |
FROM python:3.6-slim | |
LABEL maintainer="Aayush Sarva" email="[email protected]" | |
WORKDIR /usr/src/app | |
COPY ./requirements.txt /usr/src/app | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY . /usr/src/app | |
EXPOSE 5000 | |
CMD gunicorn -b :5000 --timeout 300 <path_to_hug_api>:__hug_wsgi__ |
# Byte-compiled / optimized / DLL files | |
__pycache__/ | |
*.py[cod] | |
*$py.class | |
# Distribution / packaging | |
.Python | |
build/ | |
develop-eggs/ | |
dist/ |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) | |
// main starts an HTTP server listening on $PORT which dispatches to request handlers. |
// Utility to get your public and private IP addresses | |
// Usage: | |
// 1. Run: go build -o myip myip.go | |
// 2. Add the executable myip to your PATH | |
// 3. Run: myip | |
package main | |
import ( | |
"fmt" |