Version 0.1.0
Last updated: 2023-04-17
Let’s get on the internet
Description
In this version the website is prepared to be hosted on Vercel.
Changes
The following changes and implementations have been made in that version of the project:
- Update the SQLite database to a free hosted PostgreSQL database on Render
- Created a free database on Render
- Changed from SvelteKit’s
invalid
to the newfail
a - Add a loading animation to the login screen while the request to the database is being awaited
Features
✅ Hosting on Vercel 🎉
✅ New PostgreSQL database 🔐
Code
In here some selected code will be explained more in depth.
login/+page.svelte
<script lang="ts">
// define signin false by default
let signin = false
</script>
{#if signin}
<!--Show the loading icon inside the form-->
{:else}
<form use:enhance={({})=>{
<!--On submit make the signin true and show the loading icon-->
signin = true
return async ({result, update}) => {
if(result.type!="redirect") {
signin = false
}
update()
}
}} action="?/login" method="POST">
<!--Show the regular form-->
{/if}
Commit: Version 0.1.0
Published: 2023-04-03