Let's make sure our Express app has the required base modules:
# within root of API
npm install --save express pg knex bcrypt
npm install --save-dev nodemon
# ======================================================== | |
# Setup a Dumb AP, Wired backbone for OpenWRT / LEDE | |
# ======================================================== | |
# Set lan logical interface as bridge (to allow bridge multiple physical interfaces) | |
uci set network.lan.type='bridge' | |
# assign WAN physical interface to LAN (will be available as an additional LAN port now) | |
uci set network.lan.ifname="$(uci get network.lan.ifname) $(uci get network.wan.ifname)" | |
uci del network.wan.ifname | |
# Remove wan logical interface, since we will not need it. | |
uci del network.wan |
type request; | |
type response; | |
type body; | |
type readyState = | |
| Unsent | |
| Opened | |
| HeadersReceived | |
| Loading | |
| Done |
# Install ARCH Linux with encrypted file-system and UEFI | |
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description. | |
# Download the archiso image from https://www.archlinux.org/ | |
# Copy to a usb-drive | |
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux | |
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration. | |
# Set swedish keymap |
I am not responsible for any damages, loss of data, system corruption, or any other mishap you may somehow cause by following this guide.
This is mainly a step-by-step reminder/log for myself of how I installed Arch on my laptop. I am putting this out there in case it is useful for someone else, it is not intended to be an official guide. As a result, you may find that this guide is very tedious or lists a lot of unnecessary/intuitive steps or just straight up does things in a way that is considered bad practice. Apart from the latter, this is intentional, as I did not find these steps intuitive at all when
// the main app file | |
import express from "express"; | |
import loadDb from "./loadDb"; // dummy middleware to load db (sets request.db) | |
import authenticate from "./authentication"; // middleware for doing authentication | |
import permit from "./permission"; // middleware for checking if user's role is permitted to make request | |
const app = express(), | |
api = express.Router(); | |
// first middleware will setup db connection |
# This guide will be using LVM on LUKS, see https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#LVM_on_LUKS | |
# Download the archlinux-*.iso image from https://www.archlinux.org/download/ and its GnuPG signature. | |
# Use gpg --verify to ensure your archlinux-*.iso is exactly what the Arch developers intended. For example: | |
$ gpg -v archlinux-2019.11.01-x86_64.iso.sig | |
# Burn the archlinux-*.iso to a 1+ Gb USB stick. On Mac, do something like: | |
$ diskutil unmountDisk /dev/disk4 | |
$ sudo dd bs=4m of=/dev/rdisk4 if=archlinux-2020.01.01-x86_64.iso |
# This guide will be using LVM on LUKS, see https://wiki.archlinux.org/index.php/Dm-crypt/Encrypting_an_entire_system#LVM_on_LUKS | |
# Download the archlinux-*.iso image from https://www.archlinux.org/download/ and its GnuPG signature. | |
# Use gpg --verify to ensure your archlinux-*.iso is exactly what the Arch developers intended. For example: | |
$ gpg -v archlinux-2019.11.01-x86_64.iso.sig | |
# Burn the archlinux-*.iso to a 1+ Gb USB stick. On Mac, do something like: | |
$ diskutil unmountDisk /dev/disk4 | |
$ sudo dd bs=4m of=/dev/rdisk4 if=archlinux-2020.01.01-x86_64.iso |
sudo dd if=archlinux-2019.11.01-x86_64.iso of=/dev/sda bs=4M status=progress oflag=sync
ls /usr/share/kbd/consolefonts
setfont latarcyrheb-sun32
ls /sys/firmware/efi/efivars
verifies we booted in UEFI#!/bin/bash | |
encryption_passphrase="" | |
root_password="" | |
user_password="" | |
hostname="" | |
user_name="" | |
continent_city="" | |
swap_size="16" |