If you are looking for a powerful and flexible framework to build amazing data applications, you should check out CubeJS. CubeJS is an open source project that lets you connect to any SQL-based data source, define your data models in a simple and consistent way, and expose them to your applications via blazing-fast APIs. Whether you want to create an internal dashboard for your business insights, or a customer-facing analytics feature for your product, CubeJS has you covered. CubeJS supports REST, SQL, and GraphQL APIs, so you can choose the best option for your needs. CubeJS also integrates seamlessly with popular data visualization tools, such as D3.js, Google Charts, Highcharts, and more. This documentation will have plenty of tutorials, examples, and demos that will help you get started and inspired.
CubeJS is like a Swiss Army knife for data applications. It has multiple tools and features to help you access, organize, and deliver data from any source. You can use it for different purposes and scenarios, depending on your needs and preferences. CubeJS is versatile, reliable, and easy to use.
Explaining CubeJS application to a 5 year old
You know how you have different books and magazines that you like to read? Sometimes you want to read one book, and sometimes you want to read another. In some cases you want to read with your family, and sometimes you want to read by yourself. Perhaps you want to read in your bed, and sometimes you want to read on the couch. CubeJS is something that helps you read your books and magazines in different ways. It lets you choose which book or magazine you want to read, and where you want to read it. It also lets you share your books and magazines with your friends, so they can read them too. CubeJS makes reading your books and magazines more fun and easy.
There are several ways to install CubeJS, including using it as a SaaS via CubeJS Cloud. We will go over a couple ways in this reference document.
There are a couple ways that we can deploy CubeJS via Docker, including dev mode and swarm.
These following commands will run CubeJS in a docker container and expose it on port 4000 / 3000. Furthermore, it will also mount the current directory as a volume for CubeJS configuration and schema files.
docker run -d -p 3000:3000 -p 4000:4000 \ -e CUBEJS_DB_HOST=postgres://hostname \ -e CUBEJS_DB_NAME=<DB_NAME> \ -e CUBEJS_DB_USER=<USER> \ -e CUBEJS_DB_PASS=<PASS> \ -e CUBEJS_DB_TYPE=<DB_TYPE> \ -e CUBEJS_API_SECRET=<API_SECRET> \ -v $(pwd):/cube/conf \ cubejs/cube:latest
To enable dev mode, pass along the environmental variable
-e CUBEJS_DEV_MODE=true \ inside of the command.
For the Docker Swarm, we recommend that you deploy a CubeJS Docker Compose via Portainer or your swarm platform of choice.
Reference to additional NodeJS docs
npm install -g cubejs-cli
yarn add cubejs-cli
After the installation, we recommend that you launch a test case.
Create a new CubeJS project using cubejs create command. You need to specify the name of your project and the type of your data source. For example, if you want to use Postgres, which is a database system, you can run this command:
cubejs create dashboard-backend -d postgres
This will create a new folder with your project files and install the necessary dependencies. You can then start your CubeJS server by running this command inside your project folder:
npm run dev
This will start your CubeJS test case server on
You can then open this URL in your browser and follow the instructions to connect to your data source and start building your data model and queries.
To upgrade CubeJS, you need to update the version of the CubeJS package that you are using. There are different ways to do that, depending on how you installed CubeJS.
If you are using Docker, you can upgrade CubeJS by pulling the latest image from the Docker Hub. You can run this command in your terminal:
docker pull cubejs/cube:latest
If you are using Node.js, you can upgrade CubeJS by updating the version of the
@cubejs-backend/server-core package in your
You can also use npm or yarn to update the package. For example, you can run this command in your terminal:
npm update @cubejs-backend/server
yarn upgrade @cubejs-backend/server