You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 12, 2019. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+17-6Lines changed: 17 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,19 @@ Netlify CLI plugin for local dev experience.
4
4
5
5
## What is Netlify Dev?
6
6
7
-
Netlify Dev brings the power of Netlify's Edge Logic layer, [serverless functions](#netlify-functions) and [add-on ecosystem](#using-add-ons) to your local laptop. It runs Netlify's production routing engine in a local dev server to make all redirects, proxy rules, function routes or add-on routes available locally and injects the correct environment variables from your site environment, installed add-ons or your netlify.toml file into your build and function environment.
7
+
Netlify Dev brings the power of Netlify's Edge Logic layer, [serverless functions](#netlify-functions) and [add-on ecosystem](#using-add-ons) to your local machine. It runs Netlify's production routing engine in a local dev server to make all redirects, proxy rules, function routes or add-on routes available locally and injects the correct environment variables from your site environment, installed add-ons or your netlify.toml file into your build and function environment.
8
8
9
9
It automatically detects common tools like Gatsby, Hugo, React Static, Eleventy, and more, to give a zero config setup for your local dev server and can help scaffolding new functions as you work on them.
10
10
11
+
## Prerequisites
12
+
13
+
There are just two:
14
+
15
+
- You should be [logged in on Netlify CLI](https://www.netlify.com/docs/cli/#authentication)
16
+
- Your project should be linked to a `siteID` on Netlify (using [netlify init](https://www.netlify.com/docs/cli/#continuous-deployment) or [netlify link](https://www.netlify.com/docs/cli/#linking-and-unlinking-sites)). You can confirm this has been done if you have a `.netlify` folder with a `state.json` file containing your `siteID`.
17
+
18
+
This is how we pull down your build environment variables and manage your addons on your local machine.
19
+
11
20
## Usage
12
21
13
22
-`netlify dev` start a local dev server for the build tool you're using
@@ -16,7 +25,7 @@ It automatically detects common tools like Gatsby, Hugo, React Static, Eleventy,
16
25
17
26
As these commands are expected to be frequently used, it may be helpful to define aliases in your terminal (Mac: [bash](https://jonsuh.com/blog/bash-command-line-shortcuts/), [zsh](https://askubuntu.com/questions/758496/how-to-make-a-permanent-alias-in-oh-my-zsh), Windows: [doskey](https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt), [registry](https://stackoverflow.com/questions/20530996/aliases-in-windows-command-prompt)) to your personal preference. For example:
18
27
19
-
```
28
+
```bash
20
29
## ~/.zshrc
21
30
alias ndeploy="netlify deploy --prod"
22
31
alias nd="netlify dev"
@@ -31,13 +40,13 @@ Currently the Netlify dev plugin is in private beta. You'll need to follow these
31
40
32
41
Make sure Netlify CLI is installed and up to date:
@@ -172,7 +181,7 @@ Add-ons are a way for Netlify users to extend the functionality of their Jamstac
172
181
173
182
To try out an add-on with Netlify dev, run the `netlify addons:create` command:
174
183
175
-
```
184
+
```bash
176
185
netlify addons:create fauna
177
186
```
178
187
@@ -186,8 +195,10 @@ After you have installed an add-on, it will be visible with the `netlify addons:
186
195
187
196
To share your ongoing dev session with a coworker, just run Netlify Dev with a `--live` flag:
188
197
189
-
```
198
+
```bash
190
199
netlify dev --live
191
200
```
192
201
193
202
You will get a URL that looks like `https://clever-cray-2aa156-6639f3.netlify.live/`. This can be accessed by anyone as long as you keep your session open.
203
+
204
+
> Note: there are currently known issues with ending the live session alongside your webdevserver. We are working on fixing it. In the mean time you can run `ps aux | grep live-tunnel` and kill these sessions manually.
0 commit comments