Commit 9c568569 authored by david's avatar david
Browse files

Basic structure of documentation. #1

parent 1e9efa8e
*Looking for a shareable component template? Go here --> [sveltejs/component-template](https://github.com/sveltejs/component-template)*
--- # Engine Clock
# svelte app <!-- TOC -->
This is a project template for [Svelte](https://svelte.dev) apps. It lives at https://github.com/sveltejs/template. - [Engine Clock](#engine-clock)
- [Customization](#customization)
- [Build and deploy for production](#build-and-deploy-for-production)
- [Development](#development)
- [Requirements](#requirements)
- [Getting started](#getting-started)
- [About](#about)
To create a new project based on this template using [degit](https://github.com/Rich-Harris/degit): <!-- /TOC -->
```bash Aura Engine Clock is a web application for displaying the studio clock of the [Aura Radio Software Suite](https://gitlab.servus.at/aura/meta).
npx degit sveltejs/template svelte-app
cd svelte-app
```
*Note that you will need to have [Node.js](https://nodejs.org) installed.*
## Get started
Install the dependencies...
```bash
cd svelte-app
npm install
```
...then start [Rollup](https://rollupjs.org):
```bash
npm run dev
```
Navigate to [localhost:5000](http://localhost:5000). 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`.
## Customization
## Building and running in production mode ## Build and deploy for production
To create an optimised version of the app: To create an optimised version of the app run
```bash ```bash
npm run build npm run build
``` ```
You can run the newly built app with `npm run start`. This uses [sirv](https://github.com/lukeed/sirv), which is included in your package.json's `dependencies` so that the app will work when you deploy to platforms like [Heroku](https://heroku.com). ## Development
### Requirements
## Single-page app mode * [Node.js](https://nodejs.org)
By default, sirv will only respond to requests that match files in `public`. This is to maximise compatibility with static fileservers, allowing you to deploy your app anywhere. ### Getting started
If you're building a single-page app (SPA) with multiple routes, sirv needs to be able to respond to requests for *any* path. You can make it so by editing the `"start"` command in package.json: Install the NPM requirements
```js
"start": "sirv public --single"
```
## Deploying to the web
### With [now](https://zeit.co/now)
Install `now` if you haven't already:
```bash
npm install -g now
```
Then, from within your project folder:
```bash ```bash
cd public npm install
now deploy --name my-project
```
As an alternative, use the [Now desktop client](https://zeit.co/download) and simply drag the unzipped project folder to the taskbar icon.
### With [surge](https://surge.sh/)
Install `surge` if you haven't already:
```bash
npm install -g surge
``` ```
Then, from within your project folder: Then start the development server using [Rollup](https://rollupjs.org)
```bash ```bash
npm run build npm run dev
surge public my-project.surge.sh
``` ```
Navigate to [localhost:5000](http://localhost:5000). 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`.
# About # About
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment