View dev.yml
name: DEV CI | |
on: | |
push: | |
branches: [dev] | |
paths: | |
- 'apps/my-app/**' | |
pull_request: | |
branches: [dev] | |
paths: |
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 |
View iisnode.web.config
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
</appSettings> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<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: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "launch", | |
"name": "Launch LMS Program", |
View tasks.json
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "build-lms", | |
"options": { | |
"cwd": "${workspaceFolder}/apps/lms" | |
}, |
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) | |
}); | |
} |
View index.html
<!DOCTYPE html> | |
<html> | |
<head> | |
<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="https://openlayers.org/en/v4.4.2/css/ol.css" type="text/css"> | |
<!-- The line below is only needed for old environments like Internet Explorer and Android 4.x --> | |
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL,fetch"></script> |
View flask_script_name.md
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:
SCRIPT_NAME
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". |
NewerOlder