Skip to content

Instantly share code, notes, and snippets.

View 0gust1's full-sized avatar
🔥

Augustin C. 0gust1

🔥
View GitHub Profile
@0gust1
0gust1 / README.md
Last active December 13, 2024 12:59
Deploy SvelteKit on Azure App Service

Deploy a SvelteKit app (with server-side code) on Azure App service.

Here we want to deploy a SvelteKit app, which has server-side code or do Server-Side Rendering (SSR) (data endpoints, load function in components).

For a SvelteKit app which is a pure browser-only SPA or a static website, with no server-side code (as one generated with adapter-static): you don't need an Azure app service instance, an Azure storage blob container ($web) is all you need.

Note:
In theory, a Sveltekit app with a server-side should be deployable on the new "Azure Static Webapps" product, but we still need to have a dedicated adapter converting the server code to something compatible with Azure functions.

Manage your dependencies

@0gust1
0gust1 / README.md
Last active February 3, 2024 22:53
How to use SQLite+prisma+nodeJS app on Azure app service

How to use SQLite+prisma+nodeJS app on Azure app service

Context

You want to run an app on Azure appService linux (here a nodeJS app) with a simple SQLite database.

Your have read https://www.sqlite.org/whentouse.html and your app requirements are simple enough (no big concurrency, no horizontal scaling) to consider SQLite, and you don't need yet more sophisticated solutions like PostgreSQL.

You use a NodeJS based app with the Prisma ORM.

@0gust1
0gust1 / Readme.md
Last active July 21, 2023 13:56
SvelteKit: how to import tailwindcss custom config to be used in JS/TS parts

How to import tailwindcss custom config in JS/TS parts of a SvelteKit app

If you use tailwind as a styling/design-system engine for your app, you may have defined custom colors, spacings or other custom "design tokens".

Sometimes you may need to access values of this custom config file in JS/TS files or in Svelte files (<script> part).

This is often the case if you do some advanced front-end rendering using canvas, svg, d3 or webGL, etc. Or if you want to perform calculations or interpolation on theses values.

TLDR;

  • Prerequisite: a working SvelteKit+tailwindcss project