Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Add Solid app example #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ When you are ready to release your app , run the `space release` command. This w
- [SvelteKit](sveltekit-app)
- [Go](go-app)
- [Deno](deno-app)
- [SolidStart](solid-app)

## Contributing

Expand Down
11 changes: 11 additions & 0 deletions solid-app/Discovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "Solid App Example"
tagline: "A simple Solid app deployed on Space"
git: "https://github.com/deta/starters/tree/main/solid-app"
---

## Features

- Says "hello world!"
- Button with clicks count
- Built with Solid
3 changes: 3 additions & 0 deletions solid-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# SolidStart app on Space

An example Space app built with [SolidStart](https://start.solidjs.com).
7 changes: 7 additions & 0 deletions solid-app/Spacefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Spacefile Docs: https://go.deta.dev/docs/spacefile/v0
v: 0
micros:
- name: solid-app
src: ./out
engine: static
serve: .
9 changes: 9 additions & 0 deletions solid-app/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
APP_DIR=solid
OUT_DIR=out

mkdir -p $OUT_DIR
rm -rf $OUT_DIR/*

cd $APP_DIR
npm run build
cp -r dist/public/* ../$OUT_DIR
28 changes: 28 additions & 0 deletions solid-app/solid/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@

dist
.solid
.output
.vercel
.netlify
netlify

# Environment
.env
.env*.local

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
*.launch
.settings/

# Temp
gitignore

# System Files
.DS_Store
Thumbs.db
30 changes: 30 additions & 0 deletions solid-app/solid/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SolidStart

Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com);

## Creating a project

```bash
# create a new project in the current directory
npm init solid@latest

# create a new project in my-app
npm init solid@latest my-app
```

## Developing

Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server:

```bash
npm run dev

# or start the server and open the app in a new browser tab
npm run dev -- --open
```

## Building

Solid apps are built with _adapters_, which optimise your project for deployment to different environments.

By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different adapter, add it to the `devDependencies` in `package.json` and specify in your `vite.config.js`.
Loading