DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

DEV Community ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป is a community of 968,873 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Lรขm
Lรขm

Posted on

Divshot Cheat Sheet

Custom domains

See custom domains guide.

divshot domains:add foo.bar.com
Enter fullscreen mode Exit fullscreen mode

In your DNS create a CNAME: (no apex domains are supported)

www.    CNAME    yourname.divshot.io
Enter fullscreen mode Exit fullscreen mode

[CLI] Password protect

divshot protect <env> <username:password>
Enter fullscreen mode Exit fullscreen mode

[CLI] App management

divshot create <appname>
divshot rename <newname>
divshot status
divshot destroy
divshot apps
divshot account
Enter fullscreen mode Exit fullscreen mode

[CLI] Environment vars

divshot env:add <env> KEY=value
divshot env:remove <env> KEY
divshot env:pull <env>
Enter fullscreen mode Exit fullscreen mode

[CLI] Config

Edits divshot.json


divshot config:add name your-app-name
divshot config:remove name
Enter fullscreen mode Exit fullscreen mode

CLI

divshot s   # server

divshot push [staging|production|development]
divshot pull [staging|production|development]
divshot purge   # cleans cache
divshot files

divshot promote development production

divshot open [<env>]
Enter fullscreen mode Exit fullscreen mode

Configuration

See configuration reference and routing guide.

{
  "name": "yourapp",
  "root": "./app",
  "clean_urls": true,
  "clean_urls": ["/app/**", "/!components/**"],,
  "error_page": "error.html",
  "exclude": [ "Gruntfile.js" ],
  "cache_control": {},
  "routes": {
    "/*.html": "index.html",
    "/app/**/*.html": "app.html",
    "**": "index.html"
  },
  "redirects": {
    "/old/:segment/path": "/new/path/:segment",
    "/some/old/path": {
      "status": 302,
      "url": "/some/new/path"
    }
  },
  "headers": {
    "/cors-stuff/**": {
      "Access-Control-Allow-Origin": "*"
    },
    "/scripts/**": {
      "content-type": "text/javascript"
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

[Getting started] Push your app

$ divshot push
Enter fullscreen mode Exit fullscreen mode

[Getting started] Create divshot.json

{
  "name": "yourapp",
  "root": "./app"
}
Enter fullscreen mode Exit fullscreen mode

[Getting started] Install divshot-cli

$ npm install -g divshot-cli
$ divshot login
Enter fullscreen mode Exit fullscreen mode

Reference

Top comments (0)

๐ŸŒš Friends don't let friends browse without dark mode.

Sorry, it's true.