You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Katja Lutz 55530831f1 | 2 years ago | |
---|---|---|
initdb | 2 years ago | |
public | 2 years ago | |
src | 2 years ago | |
.gitignore | 2 years ago | |
README.md | 2 years ago | |
docker-compose.yaml | 2 years ago | |
package-lock.json | 2 years ago | |
package.json | 2 years ago | |
postcss.config.cjs | 2 years ago | |
tailwind.config.cjs | 2 years ago | |
tsconfig.json | 2 years ago | |
vite.config.ts | 2 years ago |
README.md
SolidStart
Setting up the project for devs
npm install
mkdir -p ../solid-directus-app/database/;
mkdir ../solid-directus-app/uploads/;
podman unshare chown -R 1000:1000 ../solid-directus-app/database/
podman unshare chown -R 1000:1000 ../solid-directus-app/uploads/
Create an .env file with content like this:
SESSION_SECRET=CHANGEME
DIRECTUS_HOST=localhost
DIRECTUS_PORT=8055
Developing
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
docker-compose up -d
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
docker-compose ps -q database
Backing up the database
docker exec $(docker-compose ps -q database) /bin/bash \
-c "/usr/bin/pg_dump -U \$POSTGRES_USER \$POSTGRES_DB" \
| gzip -9 > postgres-backup.sql.gz
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 node build
. To use a different adapter, add it to the devDependencies
in package.json
and specify in your vite.config.js
.