learn-sveltekit-dashboard Svelte Themes

Learn Sveltekit Dashboard

Dashboard from official nextjs course implemented using sveltekit

SvelteKit Dashboard

Setup

pnpm install

Developing

  1. Start a development database:
pnpm run db:dev:up

To stop the database:

pnpm run db:dev:down
  1. Start a development server:
pnpm run dev

Useful psql commands:

To connect to a PostgreSQL database using the psql command-line client, you'll need the following information:

  1. Hostname or IP address: The address where the PostgreSQL server is running.
  2. Port: The port on which PostgreSQL is listening. The default is usually 5432.
  3. Database name: The name of the database you want to connect to.
  4. Username: The username used to authenticate to the database.
  5. Password: The password for the specified username.
psql -h hostname -p port -d database -U username

or you can use the connection string

psql postgresql://username:password@dbmaster:5433/mydb?sslmode=require

Connect to a Database: As mentioned earlier, you can connect to a database using:

  1. List Databases: To list all databases, you can use:
\l
  1. Connect to a Specific Database: You can connect to a specific database after starting psql using:
\c database_name
  1. List Tables: To list all tables in the current database, use:
\dt
  1. Describe Table Structure: To describe the structure of a specific table, use:
\d table_name
  1. Execute SQL Queries: You can directly execute SQL queries within psql. For example:
SELECT * FROM table_name;
  1. Quit psql: To exit the psql command-line client, you can use:
\q
  1. Help: For a list of all available commands and their descriptions, you can use:
\?
  1. Search Command History: You can search your command history using:
\s
  1. Toggle Expanded Display: To toggle the expanded display, which shows rows vertically, use:
\x

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes