Skip to content

Commit

Permalink
chore!(cubejs-cli): Drop dev-server command (replaced by CUBEJS_DEV_M…
Browse files Browse the repository at this point in the history
…ODE)
  • Loading branch information
ovr committed Nov 11, 2020
1 parent 538f89f commit 9a5292e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 37 deletions.
4 changes: 2 additions & 2 deletions docs/Cube.js-Backend/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ Boolean to enable or disable a check duplicate property names in all objects of

Since 0.23 Cube.js CLI uses `docker` insead of `express` template as a default for app creation and it's recommended way for production purposes.
To migrate you should move all of your Cube.js dependencies in package.json to `devDependencies` and leave all of your dependencies that you use to configure Cube.js in `dependencies`.
Also `./node_modules/.bin/cubejs-server dev-server` command should be used to run Cube.js Dev Server.

For example:

**package.json**:
Expand Down Expand Up @@ -485,7 +485,7 @@ Should become
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "./node_modules/.bin/cubejs-server dev-server"
"dev": "./node_modules/.bin/cubejs-server server"
},
"dependencies": {
"jwk-to-pem": "^2.0.4"
Expand Down
2 changes: 1 addition & 1 deletion docs/Cube.js-Backend/Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Below you can find guides for popular deployment environments:

## Production Mode

When running Cube.js Backend in production make sure `NODE_ENV` is set to `production`.
When running Cube.js Backend in production make sure `NODE_ENV` is set to `production` and `CUBEJS_DEV_MODE` is not set to `true`.
Such platforms, such as Heroku, do it by default.
In this mode Cube.js unsecured development server and Playground will be disabled by default because there's a security risk serving those in production environments.
Production Cube.js servers can be accessed only with [REST API](rest-api) and Cube.js frontend libraries.
Expand Down
21 changes: 0 additions & 21 deletions docs/Cube.js-ClI/Reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,6 @@ Create app called `demo-app` using `serverless` template and `athena` database:
$ cubejs create demo-app -d athena -t serverless
```

## dev-server

[[warning | Note]]
| To define configuration you should use `cube.js` configuration file. See [available options](https://cube.dev/docs/@cubejs-backend-server-core#options-reference).

The `dev-server` command starts Cube.js in development mode.

### Usage

Default start:

```bash
$ cubejs dev-server
```

With debug information:

```sh
$ cubejs dev-server --debug
```

## server

[[warning | Note]]
Expand Down
2 changes: 0 additions & 2 deletions packages/cubejs-cli/src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import program from 'commander';

import { configureDevServerCommand } from './command/dev-server';
import { configureServerCommand } from './command/server';
import { configureDeployCommand } from './command/deploy';
import { configureCreateCommand } from './command/create';
Expand Down Expand Up @@ -28,7 +27,6 @@ program
await configureCreateCommand(program);
await configureGenerateCommand(program);
await configureDeployCommand(program);
await configureDevServerCommand(program);
await configureServerCommand(program);

if (!process.argv.slice(2).length) {
Expand Down
8 changes: 0 additions & 8 deletions packages/cubejs-cli/src/command/dev-server.ts

This file was deleted.

4 changes: 1 addition & 3 deletions packages/cubejs-cli/src/templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,6 @@ services:
# - .:/cube/conf
- ./cube.js:/cube/conf/cube.js
- ./schema:/cube/conf/schema
# Remove this line for production, dev-server must be used only during development
entrypoint: cubejs dev-server
redis:
image: redis:6
Expand All @@ -253,7 +251,7 @@ services:
const templates = {
docker: {
scripts: {
dev: './node_modules/.bin/cubejs-server dev-server',
dev: './node_modules/.bin/cubejs-server server',
},
files: {
'cube.js': () => cubeJs,
Expand Down

0 comments on commit 9a5292e

Please sign in to comment.