Skip to content

Instantly share code, notes, and snippets.


Michael Szul szul

View GitHub Profile
View dev.yml
name: DEV CI
branches: [dev]
- 'apps/my-app/**'
branches: [dev]
szul / iisnode.yml
Created Aug 14, 2020
Example IISNode YAML file
View iisnode.yml
node_env: "production"
nodeProcessCommandLine: "C:\Program Files\nodejs\node.exe --no-deprecation --no-warnings"
promoteServerVars: "HTTP_UID,LOGON_USER"
nodeProcessCountPerApplication: 4
debugHeaderEnabled: true
devErrorsEnabled: true
szul / iisnode.web.config
Created Aug 14, 2020
Example Web.config for IISNode
View iisnode.web.config
<?xml version="1.0" encoding="utf-8"?>
<rule name="StaticContent" stopProcessing="true">
<match url="([\S]+[.](jpg|jpeg|gif|css|png|ts|cscc|less|ico|html|map|svg))" />
<action type="None" />
View launch.json
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit:
"version": "0.2.0",
"configurations": [
"type": "node",
"request": "launch",
"name": "Launch LMS Program",
View tasks.json
// See
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
"label": "build-lms",
"options": {
"cwd": "${workspaceFolder}/apps/lms"
szul / node-cache.ts
Created Jan 27, 2020
Abstraction layer for the node-cache Node.JS package
View node-cache.ts
import * as NodeCache from 'node-cache';
export class Cache {
private _cache: NodeCache;
constructor(ttlSeconds: number) {
this._cache = new NodeCache({
stdTTL: ttlSeconds,
checkperiod: (ttlSeconds * 0.2)
szul / index.html
Created Nov 14, 2019 — forked from ThomasG77/index.html
Simple OpenLayers Reverse Geocoding sample with Nominatim
View index.html
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=description content="">
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Reverse geocoding</title>
<link rel="stylesheet" href="" type="text/css">
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
<script src=",Element.prototype.classList,URL,fetch"></script>

Serving Flask under a subpath

Your Flask app object implements the __call__ method, which means it can be called like a regular function. When your WSGI container receives a HTTP request it calls your app with the environ dict and the start_response callable. WSGI is specified in PEP 0333. The two relevant environ variables are:

The initial portion of the request URL's "path" that corresponds to the application object, so that the application knows its virtual "location". This may be an empty string, if the application corresponds to the "root" of the server.

View howto_python_flask_iis_wfastcgi
Assume IIS is installed. My machine already had IIs 8.5.
Install Python
1. Download web installer (Python 3.6.3).
2. Run as Administrator.
3. Select custom installation for all users.
4. Choose install directory such that there are no white spaces in the path. Not sure if it needs to be done. Just being cautious.
5. Check the box for "Add Python 3.6 to PATH".