Everything you need to build a Svelte project, powered by create-svelte
.
Clone this repository:
git clone https://github.com/Orlinkzz/svelte-pgsql.git
cd svelte-pgsql
npm install
cp .env.example .env
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
Knex.js is a query builder library for Node.js that supports various types of databases, including PostgreSQL, MySQL, and SQLite. Knex allows you to efficiently manage database schema migrations and seeders for initial data.
To get started, install Knex.js and the appropriate database driver (for example, PostgreSQL):
npm install knex pg
If you are using another database like MySQL, you can replace pg
with the relevant driver, such as mysql2
.
To simplify using migration and seeder commands, you can use shorter scripts as follows:
npm run migrate:make create_table_name_migration
npm run migrate
npm run rollback
npm run seed:make seed_name
npm run seed
npm run seed -- --specific=seed_name.cjs
This documentation allows you to manage migrations and seeders more efficiently by using scripts in package.json
, speeding up your development and database management process.
[email protected]
or [email protected]