Add the type
property to package.json
to ensure modules are supported:
{
"type": "module",
}
*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.
FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
// Core assets | |
let coreAssets = []; | |
// On install, cache core assets | |
self.addEventListener('install', function (event) { | |
// Cache core assets | |
event.waitUntil(caches.open('app').then(function (cache) { | |
for (let asset of coreAssets) { | |
cache.add(new Request(asset)); |
Version | Link |
---|---|
ECMAScript 2015 - ES2015 - ES6 | All Features List |
ECMAScript 2016 - ES2016 - ES7 | All Features List |
ECMAScript 2017 - ES2017 - "ES8" | All Features List |
ECMAScript 2018 - ES2018 - "ES9" | All Features List |
ECMAScript 2019 - ES2019 - "ES10" | All Features List |
ECMAScript 2020 - ES2020 - "ES11" | All Features List |
#!/usr/bin/env bash | |
set -ex | |
export TEST_CLUSTER_NAME=quick-test | |
export CERT_MANAGER_VERSION=v1.3.1 | |
export KIND_IMAGE=kindest/node:v1.20.2 | |
# Create test cluster | |
echo "Creating test cluster..." | |
kind create cluster --name="$TEST_CLUSTER_NAME" --image="$KIND_IMAGE" | |
until kubectl --timeout=120s wait --for=condition=Ready pods --all --namespace kube-system; do sleep 1; done |
// https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP | |
// https://scotthelme.co.uk/content-security-policy-an-introduction/ | |
// scanner: https://securityheaders.com/ | |
const rootDomain = `your-domain.com`; // or your server IP for dev | |
const directives = { | |
'img-src': [ | |
"*", | |
"'self'", |
Disclaimer: this step-by-step GIST has been created with no guarantees, I may have missed some steps because of distraction or chiptune improvised on-chair-dancing, so be patient and let me know if I must add or fix something.
This is the way for living long and prospering!
Download and install Raspberry Imager: https://www.raspberrypi.org/software/
<html> | |
<head> | |
<script type="text/javascript" src="/jquery.min.js"></script> | |
<title>Mime type checker</title> | |
<script> | |
$(function () { | |
var result = $('div#result'); | |
if (window.FileReader && window.Blob) { | |
$('span#submit').click(function () { | |
var files = $('input#file').get(0).files; |
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: ubuntu | |
labels: | |
app: ubuntu | |
spec: | |
containers: | |
- image: ubuntu | |
command: |