From 656dd80bfbe3e88a850c8f9c6dad3f4eba5a3d5c Mon Sep 17 00:00:00 2001 From: Rolands Laucis Date: Wed, 26 Jul 2023 11:15:06 +0300 Subject: [PATCH 1/2] Update README.md --- demos/full-stack_framework/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demos/full-stack_framework/README.md b/demos/full-stack_framework/README.md index f2fde27..bbf46e0 100644 --- a/demos/full-stack_framework/README.md +++ b/demos/full-stack_framework/README.md @@ -10,7 +10,7 @@ * ```npm i``` * ```npm run dev``` -Should start the SvelteKit Vite local webserver and print out its url, that you can visit on your browser to begin the interactive demo. +That should start the SvelteKit Vite local webserver and print out its url, that you can visit on your browser to begin the interactive demo. Should also log some startup status messages upon the first http request. * Visi the URL on one or multiple tabs or browser instances. @@ -23,9 +23,9 @@ This is powerful because you nolonger need to write a REST API middle layer betw In addition, this demo makes use of the included SocioSecure Vite plugin to encrypt the actual SQL queries on the front end source code. You can check the console logs, websocket messages in the browser Network panel or the Svelte source code on the browser. The sent SQL messages are scrambled gibberish. However, the dynamic parameters are not. -## Next check out the [src/routes/+page.svelte](https://github.com/Rolands-Laucis/Socio/blob/master/demos/full-stack_framework/src/routes/%2Bpage.svelte) file to see how the magic is done on the frontend - it's super simple ;) - -This is because im new to TypeScript and am not yet aware of the configuration options i need to get stuff working for everyone. Would be nice, if someone could help with this :) +## Next check out +* [src/routes/+page.svelte](./src/routes/+page.svelte) file to see how the magic is done on the frontend - it's super simple ;) +* [src/hooks.server.ts](./src/hooks.server.ts) file to see how the magic is done on the backend. SocioServer is created here. ## Building this for production * ```npm i @sveltejs/adapter-node``` or other production adapter you need. For Node.js backend servers, this will work. @@ -33,4 +33,4 @@ This is because im new to TypeScript and am not yet aware of the configuration o * Set up .env config loading in Vite. Either the npm lib `dotenv` or use ``import.meta.env`` ES property, which Vite should populate with env vars automatically on build. * ```npm run build``` to build the project to a default dir called ``./build`` * ``node build/index.js`` to run the built node.js backend server, that will host the entire built SvelteKit project. Or ```node build``` for short. -* Probably a good idea to set up NginX reverse proxy and launch the run cmd through ``pm2`` (process manager 2), so that it is revived, if it crashes. \ No newline at end of file +* Probably a good idea to set up NginX reverse proxy and launch the run cmd through ``pm2`` (process manager 2), so that it is revived, if it crashes. From 26c849586e74606872bfcd132733d7019b4dfdc7 Mon Sep 17 00:00:00 2001 From: Rolands Laucis Date: Wed, 26 Jul 2023 11:18:37 +0300 Subject: [PATCH 2/2] Update readme.md --- demos/basic/readme.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/basic/readme.md b/demos/basic/readme.md index d95376b..a82741f 100644 --- a/demos/basic/readme.md +++ b/demos/basic/readme.md @@ -10,7 +10,7 @@ * ```npm i``` * ```npm run demo``` -Should start the express webserver and print out its url, that you can visit on your fav browser to begin the interactive demo. +This should start the express webserver and print out its url, that you can visit on your fav browser to begin the interactive demo. * Visi the URL on one or multiple tabs or browser instances. * Then press the big INSERT button, which will insert a new row into the DB on the users table. @@ -20,4 +20,6 @@ As you will notice, all instances of the browsers and their tabs update their va This is powerful because you nolonger need to write a REST API middle layer between front and back end and manually sync states and data, which in practice is often challenging and laborious. With Socio this is all done automagically for you. As well as no need to write DB query interfacing middle layers, since your SQL queries can just sit in one place - the front end - where their use sits. -## Next check out the ``client.js`` file to see how the magic is done on the frontend - its super simple ;) \ No newline at end of file +## Next check out +* [client.js](./client.js) file to see how the magic is done on the frontend - it's super simple ;) +* [server.js](./server.js) file to see how the magic is done on the backend. The Express.js http server and SocioServer is created here.