menu

ZEIT

Our mission is to make cloud computing as easy and accessible as mobile computing. You can find our Next.js community here.

Channels
Team

Staging/production target names

March 20, 2019 at 10:14pm

Staging/production target names

March 20, 2019 at 10:14pm

I've been playing a bit with the new release of targets:

$ now --target staging
> Deploying ~/Developer/ayrton/remotestories/web under remotestories
> Using project remotestories
> https://remotestories-cid28lk8i.now.sh [v2] [4s]
┌ package.json Ready [2m]
├── λ about (112.17KB) [sfo1, bru1]
├── ...
└── ...
> Ready! Aliases assigned [2m]
- https://remotestories-ayrton.remotestories1.now.sh
- https://remotestories.remotestories1.now.sh

First thing I've noticed are the weird remotestories1 suffixes, I used to be able to deploy to remotestories.now.sh and used that as staging link. I thought I was going to be able to keep using the now.sh domain as staging domain.

The remotestories.now.sh link 404s now because I removed my previous alias manually via the web ui.

My username's ayrton, and team name is remotestories

My now.json file:

{
"name": "remotestories",
"version": 2,
"alias": "www.remotestories.com",
"scope": "remotestories",
"build": {},
"builds: [],
"routes": [],
}

March 20, 2019 at 10:17pm

The deprecated now alias still works like before as far as I can tell, it seems the issues I'm having is with the --target (both staging and production) option specifically

$ now alias
> WARN! The `now alias` command (no arguments) was deprecated in favour of `now --target production`.
> Assigning alias www.remotestories.com to deployment remotestories-cid28lk8i.now.sh
> Success! www.remotestories.com now points to remotestories-cid28lk8i.now.sh [6s]
Edited
  • reply
  • like

March 21, 2019 at 7:30pm

It seems that the --target production is aliasing correctly:

$ now --target production
> Deploying ~/Developer/ayrton/remotestories/web under remotestories
> Using project remotestories
> Synced 1 file (929B) [1s]
> https://remotestories-2r2gu37sh.now.sh [v2] [11s]
┌ package.json Ready [2m]
└── ...
> Ready! Aliases assigned [2m]
- https://www.remotestories.com [in clipboard]
  • reply
  • like