Setup
Esta página aún no está disponible en tu idioma.
This guide will walk you through setting up LaunchFast. We will go through the process of cloning the project, installing dependencies, setting up your database and running the local development server.
Prerequisites
Before you can get started, you will need to have the following installed on your machine.
Project setup
-
Create a new database
You can use any database including PostgreSQL, SQLite, Redis, MongoDB, and Firestore.
Before creating a new LaunchFast project, make sure to have created a new database and have the environment variables ready. For example when using PostgreSQL, the connection string will look something like this:
Terminal window postgresql://user:password@host:port/database -
Initialize a new LaunchFast project
First you need to clone the LaunchFast repository:
Terminal window git clone https://github.com/LaunchFast-Boilerplates/launchfa.st-astroTerminal window git clone https://github.com/LaunchFast-Boilerplates/launchfa.st-sveltekitTerminal window git clone https://github.com/LaunchFast-Boilerplates/launchfa.st-nextjsNext, we are going to install all the dependencies. Make sure you have installed npm before running the following command:
Terminal window npm installNow, we need to set up the environment variables. To do this, copy the
.env.example
file in the root of your project and rename it to.env
.Then open the
.env
file and set at least theDATABASE_TYPE
and the relevant database provider environment variables:Terminal window # Database## "pg" OR "redis" OR "mongodb" OR "sqlite" OR "firestore"DATABASE_TYPE="pg"## Redis (/Upstash) Environment VariableREDIS_URL="redis://default:...@...upstash.io:..."## Postgres (/Neon) Environment VariablePOSTGRES_URL="postgresql://neondb_owner:...@...-pooler.us-east-2.aws.neon.tech/neondb?sslmode=require"## MongoDB Environment VariableMONGODB_URL="mongodb+srv://<username>:<password>@<prefix>.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0"## SQLite Environment VariableSQLITE_URL="libsql://....turso.io"SQLITE_AUTH_TOKEN="..."## FirebaseFIREBASE_PROJECT_ID="..."FIREBASE_PRIVATE_KEY_ID="..."FIREBASE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n"FIREBASE_CLIENT_EMAIL="firebase-adminsdk-..@...iam.gserviceaccount.com"FIREBASE_CLIENT_ID="..."FIREBASE_STORAGE_BUCKET="gs://...appspot.com"Further, to initiate the relevant schema on the database provider, run the following:
Terminal window npm run db:setupThe last step is to set the LaunchFast repository as the upstream origin for your project, so you can pull in updates in the future.
Run the following commands:
Terminal window rm -rf .gitgit initgit remote set upstream https://github.com/LaunchFast-Boilerplates/launchfa.st-astrogit add -Agit commit -m "Initial commit"git pushTerminal window rm -rf .gitgit initgit remote set upstream https://github.com/LaunchFast-Boilerplates/launchfa.st-sveltekitgit add -Agit commit -m "Initial commit"git pushTerminal window rm -rf .gitgit initgit remote set upstream https://github.com/LaunchFast-Boilerplates/launchfa.st-nextjsgit add -Agit commit -m "Initial commit"git push -
Set up your storage provider
Storage is necessary to upload and serve files like images for example for the avatars of users. LaunchFast supports all S3-compatible storage providers (AWS S3, Cloudflare R2, and Supabase Storage) and Firebase Storage.
-
Start your development server
Now your app should be ready to go. To start the local development server, navigate into your project root folder and run the following command.
Terminal window npm run devOpen localhost:3000 in your browser to see the your app.