### Node Application Setup Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command clones a NocoDB seed repository, installs its dependencies, and starts the Node.js application. ```bash git clone https://github.com/nocodb/nocodb-seed cd nocodb-seed npm install npm start ``` -------------------------------- ### Docker Compose Installation for PostgreSQL Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command clones the NocoDB repository, navigates to the Docker Compose directory for PostgreSQL, and starts the services using Docker Compose. ```bash git clone https://github.com/nocodb/nocodb cd nocodb/docker-compose/pg docker-compose up -d ``` -------------------------------- ### Build NocoDB Frontend Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/development-setup/index.html Builds and runs the NocoDB frontend. This command installs dependencies and starts a development server that automatically reflects changes in the browser. The frontend runs on port 3000. ```bash # build frontend - runs on port 3000 cd ../nc-gui npm install npm run dev ``` -------------------------------- ### Executable Installation for Linux (x64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for Linux (x64) using curl, makes it executable, and then runs it. ```bash curl http://get.nocodb.com/linux-x64 -o nocodb -L \ && chmod +x nocodb \ && ./nocodb ``` -------------------------------- ### Executable Installation for Windows (x64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for Windows (x64) using Invoke-WebRequest. ```powershell iwr http://get.nocodb.com/win-x64.exe -OutFile Noco-win-x64.exe ``` -------------------------------- ### Executable Installation for MacOS (x64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for MacOS (x64) using curl, makes it executable, and then runs it. ```bash curl http://get.nocodb.com/macos-x64 -o nocodb -L \ && chmod +x nocodb \ && ./nocodb ``` -------------------------------- ### Executable Installation for Windows (arm64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for Windows (arm64) using Invoke-WebRequest. ```powershell iwr http://get.nocodb.com/win-arm64.exe -OutFile Noco-win-arm64.exe ``` -------------------------------- ### Install Dependencies and Setup Environment for NocoDB Unit Tests Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/engineering/unit-testing/index.html This snippet demonstrates the commands to install project dependencies, specifically filtering for nocodb, and then setting up the local environment file for unit tests by copying a sample file. It also includes opening the newly created environment file for configuration. ```bash pnpm --filter=-nocodb install # add a .env file cp tests/unit/.env.sample tests/unit/.env # open .env file open tests/unit/.env ``` -------------------------------- ### Build NocoDB Backend Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/development-setup/index.html Builds and runs the NocoDB backend service. This command installs dependencies and starts a development server that watches for changes, automatically reflecting them. The backend runs on port 8080. ```bash # build backend - runs on port 8080 cd ../nocodb npm install npm run watch:run ``` -------------------------------- ### Homebrew Installation Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html These commands add the NocoDB tap to Homebrew and then install the NocoDB package. ```bash brew tap nocodb/nocodb brew install nocodb nocodb ``` -------------------------------- ### Executable Installation for Linux (arm64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for Linux (arm64) using curl, makes it executable, and then runs it. ```bash curl http://get.nocodb.com/linux-arm64 -o nocodb -L \ && chmod +x nocodb \ && ./nocodb ``` -------------------------------- ### Setup NocoDB Unit Tests Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/unit-testing/index.html This snippet shows the commands to set up the NocoDB project for running unit tests. It involves navigating to the packages directory, installing dependencies, and copying a sample environment file. The .env file is then used to configure database connection details. ```bash cd packages/nocodbnpm install# add a .env filecp tests/unit/.env.sample tests/unit/.env# open .env fileopen tests/unit/.env ``` -------------------------------- ### Build NocoDB SDK Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/development-setup/index.html Builds the NocoDB SDK. This involves navigating to the SDK directory, installing dependencies, and running the build script. It's essential for frontend development. ```bash # build nocodb-sdk cd nocodb-sdk npm install npm run build ``` -------------------------------- ### Redirect to Airtable Import Setup Page Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/setup-and-usages/import-airtable-to-sql-database-within-a-minute-for-free/index.html This JavaScript snippet dynamically constructs a URL to redirect the user to the Airtable import setup page. It preserves existing query parameters and hash fragments from the current URL. This is useful for guiding users through specific workflows within the NocoDB application. ```javascript window.location.href = '/0.109.7/setup-and-usages/import-airtable-to-sql-database-within-a-minute-for-free' + window.location.search + window.location.hash; ``` -------------------------------- ### Executable Installation for MacOS (arm64) Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command downloads the NocoDB executable for MacOS (arm64) using curl, makes it executable, and then runs it. ```bash curl http://get.nocodb.com/macos-arm64 -o nocodb -L \ && chmod +x nocodb \ && ./nocodb ``` -------------------------------- ### Install Nix on Other Linux Distributions and macOS Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/getting-started/self-hosted/installation/nix/index.html Provides the command to install Nix using the Determinate Systems installer script. This is a prerequisite for running NocoDB with Nix on systems where Nix is not already installed. ```bash curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install ``` -------------------------------- ### Docker Installation with SQLite Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command installs and runs NocoDB using Docker with SQLite as the database. It maps port 8080 and persists data to a local directory. ```bash docker run -d --name nocodb \ -v "$(pwd)"/nocodb:/usr/app/data/ \ -p 8080:8080 \ nocodb/nocodb:latest ``` -------------------------------- ### Fetch Customer Data using NocoDB SDK Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/table-details/table-details-overview/index.html This example demonstrates how to fetch customer data using the official NocoDB SDK for JavaScript. It initializes the API client with base URL and authentication, then calls the appropriate method to list view rows. ```javascript import { Api } from "nocodb-sdk"; const api = new Api({ baseURL: "http://localhost:8080", headers: { "xc-auth": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6InVzZXJAbm9jb2RiLmNvbSIsImRpc3BsYXlfbmFtZSI6IlJpY2hhcmQiLCJhdmF0YXIiOm51bGwsInVzZXJfbmFtZSI6bnVsbCwiaWQiOiJ1c3ExbGNpeWp4ejh5bzY4Iiwicm9sZXMiOnsib3JnLWxldmVsLXZpZXdlciI6dHJ1ZX0sInRva2VuX3ZlcnNpb24iOiI0ZjUyOTUxZGQwOTZmMTVjMTY0Y2U5MDM1OTk1YzlmMDE1MTJjMGNjOThkYmRiMDU2ZmFhM2JhZWE1OWY4Y2QzMTcyN2FjOWZkMTJjNDA2ZiIsImlhdCI6MTY5NTk5MTg0NywiZXhwIjoxNjk2MDI3ODQ3fQ.I7P5caoiDSO4j_3D032XxWxxXwyEju6pL5y3Mnu_MNU" } }) api.dbViewRow.list( "noco", "ExternalDB", "Customer", "Customer", { "offset": 0, "limit": 25, "where": "" }).then(function (data) { console.log(data); }).catch(function (error) { console.error(error); }); ``` -------------------------------- ### Docker Installation with PostgreSQL Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html This command installs and runs NocoDB using Docker with PostgreSQL. It requires environment variables for database connection and JWT secret, and maps port 8080. ```bash docker run -d --name nocodb-postgres \ -v "$(pwd)"/nocodb:/usr/app/data/ \ -p 8080:8080 \ -e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \ -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ nocodb/nocodb:latest ``` -------------------------------- ### Create AWS ECS Cluster Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html Command to create a new Amazon Elastic Container Service (ECS) cluster. Requires AWS CLI to be installed and configured. ```bash aws ecs create-cluster \ --cluster-name ``` -------------------------------- ### Redirect to Setup and Usages Page with Query Parameters and Hash Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/setup-and-usages/display-value/index.html This JavaScript snippet redirects the current browser window to a specific page within the NocoDB documentation, preserving any existing query parameters and hash fragments. It's useful for navigating between different sections of the documentation dynamically. ```javascript window.location.href = '/0.109.7/setup-and-usages/display-value' + window.location.search + window.location.hash; ``` -------------------------------- ### Redirect to NocoDB Setup Page Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/setup-and-usages/code-snippets/index.html This JavaScript snippet redirects the current browser window to the NocoDB setup and usages page. It preserves any existing query parameters and hash fragments from the current URL. This is useful for guiding users to the correct documentation or setup flow. ```javascript window.location.href = '/0.109.7/setup-and-usages/code-snippets' + window.location.search + window.location.hash; ``` -------------------------------- ### Install NocoDB SDK for Javascript Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/developer-resources/sdk/index.html This command installs the nocodb-sdk package using npm. Ensure you have Node.js and npm installed on your system. ```bash npm i nocodb-sdk ``` -------------------------------- ### Configure Test Environment with beforeEach Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/unit-testing/index.html Sets up the test environment before each test execution using the `init` helper function. This function initializes a Noco instance, resets databases, creates a root user, and provides authentication tokens and server instances. It's crucial for ensuring a clean state for every test. ```typescript let context; beforeEach(async function () { context = await init(); project = await createProject(context); table = await createTable(context, project); }); ``` -------------------------------- ### Deploy NocoDB on GCP Cloud Run Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/getting-started/installation/index.html Command to deploy a NocoDB service on Google Cloud Run. It specifies the container image, region, and allows unauthenticated access. Requires `gcloud` CLI to be installed and configured. ```bash gcloud run deploy --image=gcr.io//nocodb/nocodb:latest \ --region=us-central1 \ --allow-unauthenticated \ --platform=managed ``` -------------------------------- ### Setup PostgreSQL Database for Playwright Tests Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/playwright/index.html Starts a PostgreSQL database instance using Docker Compose, configured for Playwright E2E tests. This command utilizes a specific Docker Compose file for PostgreSQL setup. ```bash docker-compose -f ./tests/playwright/scripts/docker-compose-playwright-pg.yml up -d ``` -------------------------------- ### Setup MySQL Database for Playwright Tests Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/engineering/playwright/index.html Starts a MySQL database instance using Docker Compose, specifically configured for Playwright E2E tests. This command uses a predefined Docker Compose file for MySQL setup. ```bash docker-compose -f ./tests/playwright/scripts/docker-compose-mysql-playwright.yml up -d ``` -------------------------------- ### Initialize Theme and Data Attributes | JavaScript Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/category/getting-started/index.html This JavaScript code snippet initializes the theme based on URL parameters or local storage, and sets data attributes on the document element. It handles theme selection (light/dark) and applies custom data attributes starting with 'docusaurus-data-'. ```javascript function() { function t(t) { document.documentElement.setAttribute("data-theme", t); } var e = function() { try { return new URLSearchParams(window.location.search).get("docusaurus-theme"); } catch (t) { // ignore } }() || function() { try { return localStorage.getItem("theme"); } catch (t) { // ignore } }(); t(null !== e ? e : "light"); }(), function() { try { const c = new URLSearchParams(window.location.search).entries(); for (var [t, e] of c) { if (t.startsWith("docusaurus-data-")) { var a = t.replace("docusaurus-data-", "data-"); document.documentElement.setAttribute(a, e); } } } catch (t) { // ignore } } ``` -------------------------------- ### Run NocoDB using Nix Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/getting-started/self-hosted/installation/nix/index.html Command to run NocoDB directly from its GitHub repository using Nix. This assumes Nix is already installed on the system. ```bash nix run github:nocodb/nocodb ``` -------------------------------- ### Configure NocoDB SDK Api with Auth Token Source: https://github.com/nocodb/noco-docs/blob/main/docs/dist/0.109.7/developer-resources/sdk/index.html This example demonstrates how to configure the NocoDB Api client using an authentication token ('xc-auth'). Replace ':' with your NocoDB instance details and '' with your actual token. ```javascript const api = new Api({ baseURL: 'https://:', headers: { 'xc-auth': '' } }) ```