Skip to content

Instantly share code, notes, and snippets.

View modeswitch's full-sized avatar

Alan K modeswitch

  • Brainsights
  • Toronto
View GitHub Profile
@modeswitch
modeswitch / app.js
Created June 19, 2017 20:50
basic auth
const express = require("express");
let app = express();
let basicAuth = require("express-basic-auth");
app.use(basicAuth({
users: {
"brainsights": "donthackus",
},
challenge: true,
@modeswitch
modeswitch / gist:114c9bd55d800df242a2
Last active June 19, 2020 17:16
Building Node.js for Anddoid

Before you begin

Make sure you have adb installed and that it works. Test this by connecting your phone and running adb devices. In order to proceed past the build stage, your device must be rooted. The device I used is running Cyanogenmod with root enabled for both apps and adb.

Build

Fetch the Android NDK

You'll need to get the Android NDK. I used r8e, which you can get from here: http://dl.google.com/android/ndk/android-ndk-r8e-linux-x86.tar.bz2. Make sure you get the x86 version, as the x86_64 version will not help you. Let's call the path where you unpack this NDK_PATH.