This Web App was created with SvelteJS and it uses the microblog rest api.
First of all pull the microblog rest api, to get the newest features.
Run the microblog rest api and mysql workbench.
The registration of a new user gives this user a "USER ROLE" by default
Also when you REGISTER a new user you have to navigate to the login page to signin.
You can use the two admin users that are saved in the db automatically:
| USERNAME | PASSWORD |
|----------|----------|
| admin1 | root |
| admin2 | root |
The jwt that is sent by the server is stored in a cookie. This is not recommended, it should be stored in a HttpOnly cookie, but for semplicity I used normal client side cookies to store the token.
Looking for a shareable component template? Go here --> sveltejs/component-template
Install the dependencies...
cd microblog-svelte
npm install
...then start Rollup:
npm run dev
Navigate to localhost:5000. You should see your app running. Edit a component file in src
, save it, and reload the page to see your changes.
By default, the server will only respond to requests from localhost. To allow connections from other computers, edit the sirv
commands in package.json to include the option --host 0.0.0.0
.
To create an optimised version of the app:
npm run build