[WIP] tools.maximeborg.es
π Based on preact-cli. Ready to deploy using [Webpack] and [Preact]
π₯ Should be live on tools.maximeborg.es π₯
1. Clone this repo:
git clone https://github.com/maximeborges/tools.maximeborg.es.git tools.maximeborg.es
cd tools.maximeborg.es
2. Install dependencies:
yarn
or (slower)
npm install
3. Build !:
yarn build
You're done! Now serve the
build
folder from wherever you want!
1. Edit src/manifest.json: (default)
{
"name": "Tools @ maximeborg.es",
"short_name": "Tools",
"start_url": "/",
"display": "standalone",
"orientation": "portrait",
"background_color": "#fff",
"theme_color": "#333745",
"icons": [{
"src": "/assets/icons/android-chrome-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "/assets/icons/android-chrome-512x512.png",
"type": "image/png",
"sizes": "512x512"
}]
}
2. Do whatever the fuck you want:
src
βββ assets
β βββ favicon.ico
β βββ icons
β βββ android-chrome-192x192.png
β βββ android-chrome-512x512.png
β βββ apple-touch-icon.png
β βββ favicon-16x16.png
β βββ favicon-32x32.png
β βββ menu.svg
β βββ mstile-150x150.png
βββ components
β βββ app.js
β βββ layout
β β βββ Header
β β β βββ index.js
β β β βββ style.scss
β β βββ Sidebar
β β βββ index.js
β β βββ style.scss
β βββ routes
β βββ Converter
β β βββ index.js
β β βββ style.scss
β βββ Crypto
β β βββ index.js
β β βββ style.scss
β βββ Error
β β βββ index.js
β β βββ style.scss
β βββ Home
β βββ index.js
β βββ style.scss
βββ index.js
βββ manifest.json
βββ style
βββ helpers.scss
βββ index.scss
βββ mixins.scss
βββ variables.scss
After building the app, you can use the deploy.sh
script to deploy the build/
directory directly to your server using rsync
. The format is ./deploy.sh <dry-run|live> <username@server> <port> <dist_path>
.
Example:
./deploy.sh live myuser@tools.maximeborg.es 22 /var/www/tools.maximeborg.es
Since this application use preact-router
, you can access any page with a simple rewrite rule from your reverse-proxy. There is an example using Caddy:
tools.maximeborg.es {
header / server "AN AMAZING UNICORN"
tls contact@maximeborg.es
root /var/www/tools.maximeborg.es
gzip
rewrite / {
to {path} /
}
}
MIT