svelte-php-template

Svelte Php Template

Modified sveltejs/tempate to use PHP as server.

Svelte+PHP template

This is a project template modified from original Svelte template to work with PHP as a developemnt server.

To create a new project based on this template using degit:

npx degit kitinon/svelte-php-template my-app
cd my-app

Note that you will need to have Node.js and PHP installed.

Get started

Install the dependencies...

cd my-app
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.

Production

The content of /public folder can be installed to a web server that support PHP i.e. nginx, apache http server, etc.

Notes

This template differs from the original one that it generates HTML Custom Elements. To generate a 'normal' svelte component, you can remove 'customElement' parameter from svelte plugin in rollup.config.js file or simply set it to false.

Top categories

Loading Svelte Themes