GoSvelte
What is GoSvelte?
GoSvelte is starter kit to build modular web applications using Golang and Svelte compiler to power a template engine in a productive approach.
Learn more at the Golang website, or stop by the Svelte website.
Get started
Note that you will need to have Go and Node.js both installed.
Clone this repository and install the project dependencies by doing the following:
$ git clone https://github.com/moadkey/gosvelte.git <my-project-name>
$ cd <my-project-name>
$ yarn # ( `yarn install` or `npm install`)
Development
$ yarn dev # (or `npm run dev`)
Navigate to localhost:3000. You should see your gosvelte welcome app running.
Edit a component file in resources/views
to see your page changes.
Edit the go file in modules/welcome
to change your page.
Note that you need to restart in case go code changed but not if svelte component file: added, modified, renamed or deleted. (hot recompilation & live reloading)
In case you need to run only svelte compiler or go application:
$ yarn svelte # (or `npm run svelte`)
#or
$ yarn go # (or `npm run go`)
Deployment
$ yarn build # (or `npm run build`)
$ yarn start # (or `npm run start`)
Happy Coding.