From dc162bc570ec1a30f03fcab7d51d9f331ed9a087 Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 7 Nov 2023 15:11:05 +0100 Subject: [PATCH] clean up steps and results --- .../301-edge/550-deploy-to-deno-deploy.mdx | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/content/300-guides/200-deployment/301-edge/550-deploy-to-deno-deploy.mdx b/content/300-guides/200-deployment/301-edge/550-deploy-to-deno-deploy.mdx index c13943d7d7..b69b11c4dc 100644 --- a/content/300-guides/200-deployment/301-edge/550-deploy-to-deno-deploy.mdx +++ b/content/300-guides/200-deployment/301-edge/550-deploy-to-deno-deploy.mdx @@ -32,7 +32,7 @@ This guide demonstrates how to deploy an application to Deno Deploy in conjuncti To start, you create a directory for your project, and then use `deno run` to initialize your application with `prisma init` as an [npm package with npm specifiers](https://deno.land/manual/node/npm_specifiers). -### Steps +To set up your application: 1. Open your terminal and navigate to a location of your choice. 2. Run the following commands to set up your application. @@ -81,8 +81,6 @@ To start, you create a directory for your project, and then use `deno run` to in With the data model in place and your database connection configured, you can now apply the data model to your database. -### Steps - ```terminal deno run -A npm:prisma migrate dev --name init ``` @@ -112,8 +110,6 @@ deno run -A npm:prisma generate --accelerate -### Result - You now have a database schema and a locally generated Prisma Client for the Prisma Accelerate. ## 4. Create your application @@ -175,7 +171,7 @@ With the Accelerate connection string copied, you can replace the existing conne Prisma Client does not read `.env` files by default on Deno, so you must also install `dotenv-cli` locally. -### Steps +To configure Prisma Accelerate: 1. Install the `dotenv-cli`. @@ -191,38 +187,30 @@ Prisma Client does not read `.env` files by default on Deno, so you must also in # DATABASE_URL="postgres://..." ``` -### Result - The configuration of your local environment is now ready to send Prisma queries to the database through Prisma Accelerate. ## 7. Test your application locally You can now start your application locally and test the creation of log entries. -### Steps - -1. Run your script locally. - - ```terminal - npx dotenv -- deno run -A ./index.ts - ``` +```terminal +npx dotenv -- deno run -A ./index.ts +``` -2. In a web browser, open [http://localhost:8000/](http://localhost:8000/). This page writes your request to the database. +In a web browser, open [http://localhost:8000/](http://localhost:8000/). This page writes your request to the database. - ``` - { - "id": 3, - "level": "Info", - "message": "GET http://localhost:8000/", - "meta": { - "headers": "{}" - } - } - ``` - -3. Reload the page a few times.

Every time you reload, the script generates a new log entry and the id of the current log entry increments. +``` +{ + "id": 3, + "level": "Info", + "message": "GET http://localhost:8000/", + "meta": { + "headers": "{}" + } +} +``` -### Result +Reload the page a few times.

Every time you reload, the script generates a new log entry and the id of the current log entry increments. This confirms that your application works when you run it from your local environment. @@ -230,7 +218,7 @@ This confirms that your application works when you run it from your local enviro You need a GitHub repository to add your project to Deno Deploy and enable automated deployments whenever you push changes. -### Steps +To set up a GitHub repository: 1. [Create a private GitHub repository](https://github.com/new). @@ -254,9 +242,7 @@ Optionally, you can now also [link your GitHub repository to your project](/data ## 9. Deploy to Deno Deploy -Use the GitHub repository to add your application to Deno Deploy. - -### Steps +Use the GitHub repository to add your application to Deno Deploy: 1. Go to [https://dash.deno.com/new](https://dash.deno.com/new). 1. Select a GitHub organization or user and then select a repository. @@ -269,8 +255,6 @@ Use the GitHub repository to add your application to Deno Deploy. 1. Click **Link**.
Wait for the first Deno deployment to finish. -### Result - When the first deployment finishes, your browser is redirected to the project view. ### What's next