Skip to content

Commit

Permalink
Merge pull request #6 from kennedymwavu/5-document-how-to-run-examples
Browse files Browse the repository at this point in the history
docs: document how to run examples
  • Loading branch information
kennedymwavu authored Jul 8, 2024
2 parents d409341 + 13750f1 commit 44103d6
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 11 deletions.
23 changes: 22 additions & 1 deletion 09_goals/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,32 @@ You will be able to **C**reate, **R**ead, **U**pdate & **D**elete Goals.
Here's what's covered:

- Ambiorix + MongoDB
- Working with middleware:
- Working with middleware:
- Auth middleware: You will learn how you can use Jason Web Tokens ([JWT](https://jwt.io/)) to protect routes
- Error handling middleware

## Prerequisites

- An installation of the community edition of [MongoDB](https://www.mongodb.com/docs/manual/installation/)
- The [mongolite](https://github.com/jeroen/mongolite) R pkg

## Run API

1. `cd` into the `backend/` dir:

```bash
cd backend
```

1. Fire up R and restore package dependencies:

```r
renv::restore()
```

1. `server.R` is the entry point. Run this command in the terminal to start the
API:

```bash
Rscript server.R
```
1 change: 1 addition & 0 deletions 09_goals/backend/.Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
20 changes: 10 additions & 10 deletions 09_goals/renv.lock → 09_goals/backend/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"Package": "R6",
"Version": "2.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R"
],
Expand Down Expand Up @@ -131,7 +131,7 @@
"Package": "cli",
"Version": "3.6.2",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R",
"utils"
Expand All @@ -149,7 +149,7 @@
"Package": "cpp11",
"Version": "0.4.7",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R"
],
Expand All @@ -159,7 +159,7 @@
"Package": "crayon",
"Version": "1.5.2",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"grDevices",
"methods",
Expand Down Expand Up @@ -223,7 +223,7 @@
"Package": "glue",
"Version": "1.7.0",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R",
"methods"
Expand Down Expand Up @@ -286,7 +286,7 @@
"Package": "jsonlite",
"Version": "1.8.8",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"methods"
],
Expand All @@ -307,7 +307,7 @@
"Package": "lifecycle",
"Version": "1.0.4",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R",
"cli",
Expand Down Expand Up @@ -345,7 +345,7 @@
"Package": "magrittr",
"Version": "2.0.3",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R"
],
Expand Down Expand Up @@ -492,7 +492,7 @@
"Package": "sodium",
"Version": "1.3.1",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Hash": "dd86d6fd2a01d4eb3777dfdee7076d56"
},
"sourcetools": {
Expand Down Expand Up @@ -537,7 +537,7 @@
"Package": "withr",
"Version": "3.0.0",
"Source": "Repository",
"Repository": "CRAN",
"Repository": "RSPM",
"Requirements": [
"R",
"grDevices",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 44103d6

Please sign in to comment.