Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/silentworks/svelte-and-php
https://github.com/silentworks/svelte-and-php
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/silentworks/svelte-and-php
- Owner: silentworks
- Created: 2020-04-19T17:29:34.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-07-21T00:48:35.000Z (over 2 years ago)
- Last Synced: 2024-05-01T23:48:12.849Z (6 months ago)
- Language: JavaScript
- Size: 59.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svelte and php with custom elements
This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template.
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit):
```bash
npx degit silentworks/svelte-and-php svelte-and-php
cd svelte-and-php
```*Note that you will need to have [Node.js](https://nodejs.org) installed.*
## Get started
Install the dependencies...
```bash
cd svelte-and-php
npm install
```...then start [Rollup](https://rollupjs.org):
```bash
npm run dev
php -S 127.0.0.1:8080
```Navigate to [localhost:8080](http://localhost:8080). 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`.
## Building and running in production mode
To create an optimised version of the app:
```bash
npm run build
```