A very lean SolidJs
app compiled to a custom-element using
esbuild
postcss-js
shoelace-style
.
Postcss is used runtime to:
-
Render css in a style-tag in the shadow-dom to minimize external dependencies.
-
Have nested-rules expanded.
- indexPage:
.build-assets/index.html
* - Must reference the/dist/main.js
- pemKey:
.dev-certs/server.key
- pemCert:
.dev-certs/server.cert
How-to:
-
Create the CA's private key and self-signed certificate:
openssl req -nodes -new -x509 -keyout ca.key -out ca.pem -days 365 -subj "/CN=MyCA"
-
Create the server's private key and a Certificate Signing Request (CSR):
openssl req -nodes -new -keyout server.key -out server.csr -subj "/CN=localhost"
-
Use the CA to sign the server's CSR and generate the server certificate:
openssl x509 -req -in server.csr -CA ca.pem -CAkey ca.key -CAcreateserial -out server.cert -days 365
-
Move files to folder
.dev-certs
.
Built using custom esbuild
script .build
. Outputs to dist
folder.
- Always watch mode!
SurrealDB - Start local dev-server using TLS files:
package.json
:scripts
:start-db
OR
surreal start --user r00t --pass r00t surrealkv://.dev-data -A --bind 127.0.0.1:8001 --web-crt .build-assets/server.cert --web-key .build-assets/server.key
Web-server - Start local dev-server using TLS files:
package.json
:scripts
:dev
OR
node .build.mjs
-
Production build script
-
Minify Css
- Why? - Since this is an extra runtime-step performed at the client
-
Minify Js - Buildtime, so OK
-
-
Admin backend w/ login
-
SMS / Payment option to verify clients