42 lines
1.3 KiB
Markdown
42 lines
1.3 KiB
Markdown
# Project template
|
|
|
|
This is a project template for creating a [Svelte](https://svelte.dev/) app with a [python](https://www.python.org/) backend.
|
|
|
|
The template requires [npm](https://www.npmjs.com/) and [Flask](https://flask.palletsprojects.com/en/2.0.x/) to be installed.
|
|
|
|
## Quickstart
|
|
|
|
Run npm install in the webapp component to instanciate the modules required by svelte:
|
|
```
|
|
cd webapp
|
|
# to use Typescript run:
|
|
# Node scripts/setupTypeScrupt.js
|
|
npm install
|
|
# to start a local development server for the svelte app only:
|
|
npm run dev
|
|
```
|
|
|
|
For using the flask server you need to compile your Svelte App.
|
|
You need to repeat this on every change before restarting the flask server.
|
|
|
|
In the webapp folder do
|
|
```
|
|
npm run build
|
|
```
|
|
|
|
After that you need to activate the flask server.
|
|
|
|
In the project folder do:
|
|
```
|
|
flask run
|
|
```
|
|
|
|
Navigate to [http://127.0.0.1:5000/index.html](http://127.0.0.1:5000/index.html) to see the result
|
|
|
|
|
|
# Thanks
|
|
|
|
Special thanks go to
|
|
* [Joshua Nussbaum](https://dev.to/joshnuss/creating-a-sidebar-menu-in-svelte-ih2) for providing this beautiful slider menu
|
|
* [Linus Benkner](https://linu.us/sveltekit-with-tailwindcss-v3) for providing the blueprint for the tailwind integration
|
|
* [The SvelteKit project](https://kit.svelte.dev/) for providing the Framework |