From f4dccf3397cce4a097ae9293d58d79a1add22ff8 Mon Sep 17 00:00:00 2001 From: quiloos39 Date: Fri, 9 Sep 2022 01:40:53 +0300 Subject: [PATCH 1/3] add manual installation sqlite --- .../configurations/databases/sqlite.md | 36 ++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index cf7bd18d63..221bd6fd3b 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -8,7 +8,7 @@ canonicalUrl: https://docs.strapi.io/developer-docs/latest/setup-deployment-guid SQLite is the default ([Quick Start](/developer-docs/latest/getting-started/quick-start.md)) and recommended database to quickly create an app locally. -## Install SQLite locally +## Install SQLite using starter Simply use one of the following commands. @@ -34,6 +34,40 @@ This will create a new project and launch it in the browser. The [Quick Start Guide](/developer-docs/latest/getting-started/quick-start.md) is a complete step-by-step tutorial. ::: +## Install SQLite manually + +In terminal, run the following command: + + + + +```sh +npm install better-sqlite3 +``` + + + +```sh +yarn install better-sqlite3 +``` + + + + +Add the following to your `./config/database.js` file: + +```js +module.exports = ({ env }) => ({ + connection: { + client: 'sqlite', + connection: { + filename: path.join(__dirname, '..', env('DATABASE_FILENAME', '.tmp/data.db')), + }, + useNullAsDefault: true, + }, +}); +``` + ## Other SQL Databases (PostgreSQL, MySQL) Refer to the [configuration section](/developer-docs/latest/setup-deployment-guides/configurations/required/databases.md) for all supported options to setup Strapi with your SQL database. From d1d49f8566c89904b87697b5034b0aa711a8cb4e Mon Sep 17 00:00:00 2001 From: Necdet Efe Date: Tue, 20 Sep 2022 09:35:18 +0300 Subject: [PATCH 2/3] Update docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> --- .../setup-deployment-guides/configurations/databases/sqlite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index 221bd6fd3b..30a4f29088 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -10,7 +10,7 @@ SQLite is the default ([Quick Start](/developer-docs/latest/getting-started/quic ## Install SQLite using starter -Simply use one of the following commands. +Use one of the following commands: From 0f0a6ca982f7d30b1eb8c4669769604ff627063a Mon Sep 17 00:00:00 2001 From: Necdet Efe Date: Tue, 20 Sep 2022 09:37:11 +0300 Subject: [PATCH 3/3] Update docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md Co-authored-by: Shaun Brown <97027841+StrapiShaun@users.noreply.github.com> --- .../setup-deployment-guides/configurations/databases/sqlite.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md index 30a4f29088..ab2a8aed5f 100644 --- a/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md +++ b/docs/developer-docs/latest/setup-deployment-guides/configurations/databases/sqlite.md @@ -48,7 +48,7 @@ npm install better-sqlite3 ```sh -yarn install better-sqlite3 +yarn add better-sqlite3 ```