### Preview Site Locally Source: https://github.com/datopian/portaljs/blob/main/_old/content/guide/index.md Steps to install dependencies and start the local development server to preview website changes on your machine. ```bash cd /path/to/your/website npm install npm run dev ``` -------------------------------- ### Run PortalJS Development Server Source: https://github.com/datopian/portaljs/blob/main/site/content/opensource/docs/setup.md Starts the Next.js development server for your PortalJS project. This command allows you to preview your data portal locally and see changes in real-time as you develop. ```bash npm run dev ``` -------------------------------- ### Create PortalJS App with CKAN Example Source: https://github.com/datopian/portaljs/blob/main/site/content/blog/example-ckan-2021.md Command to bootstrap a new PortalJS application using the CKAN example template from GitHub. This command leverages `create-next-app` to set up the project structure and initial configuration. ```console npx create-next-app -e https://github.com/datopian/datahub/tree/main/examples/ckan ``` -------------------------------- ### Create PortalJS App for CKAN Source: https://github.com/datopian/portaljs/blob/main/_old/content/blog/example-ckan-2021.md Bootstrap a new PortalJS application using create-next-app with a specific CKAN example template from GitHub. This command initializes the project structure and dependencies. ```console npx create-next-app -e https://github.com/datopian/datahub/tree/main/examples/ckan ``` -------------------------------- ### Create Next.js App with CKAN Example Source: https://github.com/datopian/portaljs/blob/main/_old/content/docs/examples/ckan-ssg.md This command initializes a new Next.js application using a specific example from the datahub repository, pre-configured for CKAN integration. It requires Node.js and npm/npx to be installed. ```shell npx create-next-app --example https://github.com/datopian/datahub/tree/main/examples/ckan-example cd ``` -------------------------------- ### Create Next.js App with GitHub-Backed Catalog Example Source: https://github.com/datopian/portaljs/blob/main/site/content/opensource/developers/create-github-backed-data-catalog-portaljs.md This command uses `create-next-app` to scaffold a new Next.js project, cloning the specific `github-backed-catalog` example from the datopian/datahub repository. It's the initial step to start building your data catalog. ```bash npx create-next-app --example https://github.com/datopian/datahub/tree/main/examples/github-backed-catalog cd ``` -------------------------------- ### Create Next.js App with GitHub-backed Catalog Example Source: https://github.com/datopian/portaljs/blob/main/_old/content/docs/examples/github-backed-catalog.md Initializes a new Next.js application using a specific GitHub repository as a template for a GitHub-backed data catalog. This command clones the example and sets up the basic project structure. ```bash npx create-next-app --example https://github.com/datopian/datahub/tree/main/examples/github-backed-catalog cd ``` -------------------------------- ### Create PortalJS App with Next.js Source: https://github.com/datopian/portaljs/blob/main/site/content/opensource/docs/setup.md Initializes a new Next.js application using the create-next-app CLI, pre-configured with the PortalJS starter template. This command sets up the basic structure for a data portal. ```bash npx create-next-app my-data-portal --example https://github.com/datopian/datahub/tree/main/examples/learn ``` -------------------------------- ### Local Development Setup with PortalJS Source: https://github.com/datopian/portaljs/blob/main/site/content/blog/why-we-decoupled-CKAN-frontend.md Demonstrates the simple command-line steps required to install dependencies and start the PortalJS development server locally, contrasting with traditional CKAN frontend setups. ```shell npm install npm start ``` -------------------------------- ### Create PortalJS App with Next.js CLI Source: https://github.com/datopian/portaljs/blob/main/_old/content/docs/index.md Use the Next.js create-next-app command with a specific example URL to scaffold a new PortalJS data portal. This command sets up the project structure and initial configuration. ```bash npx create-next-app my-data-portal --example https://github.com/datopian/datahub/tree/main/examples/learn ``` -------------------------------- ### Run Development Server Source: https://github.com/datopian/portaljs/blob/main/examples/ckan-ssg/README.md Starts the Next.js development server, allowing you to preview the application locally. The application will typically be available at http://localhost:4200. ```shell npm run dev ``` -------------------------------- ### Run the Development Server Source: https://github.com/datopian/portaljs/blob/main/site/content/opensource/developers/create-github-backed-data-catalog-portaljs.md This command starts the local development server for your PortalJS application. Once executed, you can access your data catalog at http://localhost:3000 in your web browser. ```bash npm run dev ``` -------------------------------- ### Install Data Catalog Example Source: https://github.com/datopian/portaljs/blob/main/examples/github-backed-catalog/README.md Bootstrap the data catalog example using `create-next-app`. This command initializes a new Next.js project with the example code, setting up the basic structure. ```bash npx create-next-app --example https://github.com/datopian/portaljs/tree/main/examples/github-backed-catalog cd ``` -------------------------------- ### Local Development Setup Source: https://github.com/datopian/portaljs/blob/main/_old/content/howtos/edit-or-add-md-pages-locally.md Install project dependencies and start a local development server to preview changes. ```bash npm install npm run dev ``` -------------------------------- ### Run Production Build Source: https://github.com/datopian/portaljs/blob/main/examples/ckan-ssg/README.md Starts the application using the production-ready build generated by `npm run build`. This is used for deploying the application. ```shell npm run start ``` -------------------------------- ### Install GitHub Data Catalog Example Source: https://github.com/datopian/portaljs/blob/main/examples/openspending/README.md Bootstrap the data catalog example using create-next-app and navigate into the project directory. This sets up the basic Next.js application structure. ```shell npx create-next-app --example https://github.com/datopian/portaljs/tree/main/examples/github-backed-catalog cd ``` -------------------------------- ### Create and Navigate Next.js App Source: https://github.com/datopian/portaljs/blob/main/examples/ckan-ssg/README.md Initializes a new Next.js application using a specific example template from GitHub and then changes the directory into the newly created application folder. ```bash npx create-next-app --example https://github.com/datopian/datahub/tree/main/examples/ckan-ssg cd ``` -------------------------------- ### Run PortalJS Development Server Source: https://github.com/datopian/portaljs/blob/main/_old/content/docs/index.md Start the Next.js development server to run your PortalJS application locally. This command compiles the project and makes it accessible via a local URL. ```bash npm run dev ``` -------------------------------- ### Create Next.js App with CKAN Example Source: https://github.com/datopian/portaljs/blob/main/_old/content/docs/examples/ckan.md Bootstrap a new Next.js application using the PortalJS CKAN example template from GitHub. This command initializes the project structure and downloads the necessary files. ```bash npx create-next-app --example https://github.com/datopian/datahub/tree/main/examples/ckan cd ``` -------------------------------- ### Build and Run Data Catalog in Production Source: https://github.com/datopian/portaljs/blob/main/examples/github-backed-catalog/README.md Build the Next.js application for production deployment and run the production server. These commands prepare and serve the optimized application for deployment. ```bash npm run build npm run start ```