Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/silentworks/svelte-and-php


https://github.com/silentworks/svelte-and-php

Last synced: 23 days ago
JSON representation

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
```