Skip to content

Instantly share code, notes, and snippets.

:octocat:
🐱‍💻

Ivan Seniv seniv

:octocat:
🐱‍💻
Block or report user

Report or block seniv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View snippets.code-snippets
{
// Place your global snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"Import GraphQL Tag": {
"scope": "javascript,typescript,javascriptreact,typescriptreact",
"prefix": "imgql",
@seniv
seniv / nginxproxy.md
Created Aug 26, 2018 — forked from soheilhy/nginxproxy.md
How to proxy web apps using nginx?
View nginxproxy.md

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

View MongoManager.js
const mongoose = require('mongoose');
class MongoManager {
constructor (config) {
this._config = config;
}
getMongoUrl() {
return this._config.MONGODB_URI;
}
connect () {
You can’t perform that action at this time.