From f8300913b38d210b37444308778f79e00c34bc00 Mon Sep 17 00:00:00 2001 From: Ryan Cartwright Date: Thu, 10 Oct 2024 15:22:34 +1100 Subject: [PATCH 1/3] update introduction page --- docs/index.mdx | 54 +++++++++++++++----------------------------------- 1 file changed, 16 insertions(+), 38 deletions(-) diff --git a/docs/index.mdx b/docs/index.mdx index eaefee479..ec28a7fef 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -112,7 +112,7 @@ services: start: npm run dev:services $SERVICE_PATH ``` -You might have one service that handles everything, or a service for each route. It's up to you. Every matched service becomes a container, allowing them run and scale independently. +You might have one service that handles everything, or a service for each route. It's up to you. Every matched service becomes a container, allowing them to run and scale independently. --- @@ -153,9 +153,7 @@ import ( func main() { profiles, _ := nitric.NewBucket("profiles").Allow(nitric.BucketRead, nitric.BucketWrite, nitric.BucketDelete) - if err := nitric.Run(); err != nil { - fmt.Println(err) - } + nitric.Run() } ``` @@ -389,8 +387,9 @@ nitric start ``` - Start also emulates the resources you requested, so you can test your app - locally. And provides a Dashboard UI to interact with the resources. + Start also emulates the resources you requested, so you can [test your app + locally](/get-started/foundations/projects/local-development). And provides a + Dashboard UI to interact with the resources. ### Deploy @@ -512,45 +511,24 @@ print(response.contents); -### Manual Install +### Overriding -Alternatively, you can download pre-compiled binaries from the [releases](https://github.com/nitrictech/cli/releases) page and install them manually. +If you need to change how Nitric deploys a resources or how it interacts with a service at runtime, you can [extend or modify a provider](/providers/custom/extend). -## Update to the latest version - - - - - -```bash -brew upgrade nitric -``` - - - - - -```bash -scoop update nitric -``` - - - - - -```bash -curl -L "https://nitric.io/install?version=latest" | bash -``` + + For example, here's a [project that swaps SNS for + EventBridge](https://github.com/jyecusch/iac-ifc-comparison) on AWS. + - +### Full Customization - +If you need to deploy to a new platform or new set of services that Nitric doesn't support, you can [build your own provider](/providers/custom/create). This is a bit more advanced, but it's the ultimate escape hatch. -You can easily check which version you're on by running `nitric version`. +The included providers are written in Go and built using Terraform or Pulumi, but you can use any language or tool you like. -## Release notes +### Additional Resources -You can view the CLI release notes on our [CLI GitHub Releases page](https://github.com/nitrictech/cli/releases). +If you need to use a service/resource that Nitric doesn't support, you do that like you always would. Nitric doesn't get in the way of you using the cloud, it just makes it easier. ## What's next From 9309a00266f68fb803a3d42a9a28702c97b446ea Mon Sep 17 00:00:00 2001 From: Ryan Cartwright Date: Thu, 10 Oct 2024 15:32:40 +1100 Subject: [PATCH 2/3] update installation page --- docs/get-started/installation.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/get-started/installation.mdx b/docs/get-started/installation.mdx index 435b1d614..81ae2df49 100644 --- a/docs/get-started/installation.mdx +++ b/docs/get-started/installation.mdx @@ -6,7 +6,7 @@ description: 'Basic installation instructions for the Nitric Framework' ## Prerequisites -Nitric relies on functionality from the following projects to help retrieve plugins, containerize and deploy your application. +Nitric relies on functionality from the following projects to help retrieve plugins, containerize, and deploy your application. Please follow these links to the official installation steps for each. - [Git](https://git-scm.com/) @@ -15,9 +15,9 @@ Please follow these links to the official installation steps for each. - [Pulumi](https://www.pulumi.com/docs/cli/) _(for deployments, only needed if using the default providers)_ - When setting up docker on Linux be sure to follow the [post-installation + When setting up Docker on Linux be sure to follow the [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/) so you can - run docker as a non-root user. + run Docker as a non-root user. ## Installing the Nitric CLI From 53ca0bd7a48fb8d53cede250d1321324097ff347 Mon Sep 17 00:00:00 2001 From: Ryan Cartwright Date: Thu, 10 Oct 2024 16:41:34 +1100 Subject: [PATCH 3/3] update links and quickstart --- docs/get-started/installation.mdx | 4 +- docs/get-started/quickstart.mdx | 67 +++++++++++-------------------- docs/index.mdx | 8 ++-- 3 files changed, 29 insertions(+), 50 deletions(-) diff --git a/docs/get-started/installation.mdx b/docs/get-started/installation.mdx index 81ae2df49..f40ad067a 100644 --- a/docs/get-started/installation.mdx +++ b/docs/get-started/installation.mdx @@ -93,5 +93,5 @@ You can view the CLI release notes on our [CLI GitHub Releases page](https://git ## What's next -- Start building with the [quick start guide](./get-started/quickstart). -- Checkout out the [foundations](/foundations/why-nitric) section for a more detailed introduction to Nitric. +- Start building with the [quick start guide](/get-started/quickstart). +- Checkout out the [foundations](/get-started/foundations/why-nitric) section for a more detailed introduction to Nitric. diff --git a/docs/get-started/quickstart.mdx b/docs/get-started/quickstart.mdx index de48515cd..63ba26874 100644 --- a/docs/get-started/quickstart.mdx +++ b/docs/get-started/quickstart.mdx @@ -37,7 +37,7 @@ curl -L "https://nitric.io/install?version=latest" | bash For more installation options and dependency information review the full - [installation guide](/getting-started/installation). + [installation guide](/get-started/installation). ## Using the `new` command @@ -118,8 +118,8 @@ npm install cd hello-world # We recommend using [Pipenv](https://pipenv.pypa.io/en/latest/) for dependency and virtual environments -# We have included it in our python templates. -# Installation instructions: https://pipenv.pypa.io/en/latest/installation/#preferred-installation-of-pipenv +# We have included it in our python templates. +# Installation instructions: https://pipenv.pypa.io/en/latest/installation/#preferred-installation-of-pipenv pipenv install --dev ``` @@ -226,7 +226,7 @@ Your project should now look like this: ## Running your app -Nitric provides a local development server offering emulated versions of cloud services, suitable for local development/testing. You can use the Nitric CLI to start the local server using the `nitric start` command. +Nitric provides a local development environment offering emulated versions of cloud services, suitable for local development/testing. You can use the Nitric CLI to start your application and the local environment using the `nitric start` command. ```bash nitric start @@ -234,47 +234,27 @@ nitric start Nitric will automatically run your application using the service start script, this is located in your `nitric.yaml`. -After your service is running, it will register itself with the server. All the APIs are locally hosted on their own port, which will be displayed in the CLI output as `http://localhost:`. +```yaml title:nitric.yaml +name: example +services: + - match: services/*.ts + start: npm run dev:services $SERVICE_PATH +``` + +All the APIs are locally hosted on their own port, which will be displayed in the CLI output as `http://localhost:`. -The output will also show the local dashboard URL, the dashboard will automatically refresh with API details and other useful tools for building your application. +The output will also show the [local dashboard](/get-started/foundations/projects/local-development#local-dashboard) URL, the dashboard will automatically refresh with details about your resources and tools to interact with each of them. -Once the API is registered, you can test the API using any HTTP client, your browser, or the [local dashboard](/getting-started/local-dashboard): +Once the API is registered, you can test the API using any HTTP client, your browser, or the [local dashboard](/get-started/foundations/projects/local-development#local-dashboard): ```bash curl http://localhost:4001/hello/John Hello John ``` -## Your local dashboard - -Access the [local development dashboard](./local-dashboard) by opening the URL and port displayed in the CLI output. - -The development dashboard is a powerful tool designed to help you move faster when developing new features. With the API explorer, you can easily access automatically generated endpoints and path params. Additionally, the Schedules Explorer allows you to trigger your schedules with ease, making it easier than ever to stay on top of your tasks. Make the most of your local development process with this essential tool. - -Watch this brief video to see the development dashboard in action. You'll get a firsthand look at how the dashboard streamlines your development process by showcasing the [debugging](/guides/nodejs/debugging) of APIs and schedules in the popular code editor, VS Code. - -
-
-