Skip to content

Commit

Permalink
Merge pull request #15 from ebrahimmfadae/12-improve-documentation
Browse files Browse the repository at this point in the history
Improve documentation
  • Loading branch information
ebrahimmfadae committed Sep 14, 2023
2 parents b5a30e9 + e5f6362 commit 673a8ce
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
10 changes: 8 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
OIDC_ISSUER=http://oidc
MONGODB_URI=mongodb://mongo/oidc
# Internal envs
INTERNAL_OIDC_ISSUER=http://oidc
MONGODB_URI=mongodb://mongo/oidc

# Public addresses
PUBLIC_OIDC_ISSUER=http://localhost:3000
PUBLIC_APP_URL=http://localhost:3005
PUBLIC_API_URL=http://localhost:3006
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@

## Article reference

The article associated to this repository is written in 4 parts plus an introduction.
This repository is associated with an article series that provides a step-by-step guide on implementing OIDC ([OpenID Connect 1.0](https://openid.net/specs/openid-connect-core-1_0.html)) with Node.js, TypeScript, and MongoDB:

- Series: [How to Implement OpenID with Node.js & Typescript & MongoDB](https://dev.to/ebrahimmfadae/setup-openid-with-nodejs-and-mongodb-451j)
- Part I: [Develop Simple OpenID Authorization Server with Node.js & Typescript](https://dev.to/ebrahimmfadae/develop-an-openid-server-with-nodejs-typescript-9n1)
- Part II: [Persist OpenID Server Data on MongoDB with Node.js](https://dev.to/ebrahimmfadae/persist-openid-server-data-with-mongodb-5f95)
- Part III: [Add Resource Server Authorization to OpenID with Node.js](https://dev.to/ebrahimmfadae/add-a-resource-server-to-an-openid-provider-noo)
- Part IV: [Set OpenID Security Configs in Node.js](https://dev.to/ebrahimmfadae/openid-security-configuration-4nn8)
- [Series: Implementing OpenID with Node.js, TypeScript, and MongoDB - A Step-by-Step Guide](https://dev.to/ebrahimmfadae/setup-openid-with-nodejs-and-mongodb-451j)
- [Part I: Developing Simple OpenID Authorization Server with Node.js & Typescript](https://dev.to/ebrahimmfadae/develop-an-openid-server-with-nodejs-typescript-9n1)
- [Part II: Persisting OpenID Server Data on MongoDB with Node.js](https://dev.to/ebrahimmfadae/persist-openid-server-data-with-mongodb-5f95)
- [Part III: Adding Resource Server Authorization to OpenID with Node.js](https://dev.to/ebrahimmfadae/add-a-resource-server-to-an-openid-provider-noo)
- [Part IV: Configuring OpenID Security Settings in Node.js](https://dev.to/ebrahimmfadae/openid-security-configuration-4nn8)

## Project requirements

The project is developed and tested in this environment.
The project has been developed and tested in the following environment:

```
$ node -v
Expand All @@ -47,30 +47,28 @@ $ docker compose version
Docker Compose version v2.15.1
```

## Run & Stop
## Getting started

Install dependencies
**Install dependencies** Open a terminal and run the following command to install the project dependencies:

```
$ yarn install
```

_Note: We can move the `yarn install` step to the container, but installing the dependencies inside the container when we have no caching bothers me! Especially in the development phase._

Run containers
**Run containers** Start the project containers by running the command:

```
$ yarn docker-compose:up
$ yarn compose:up
```

You can see the front end by navigating to [http://localhost:3005](http://localhost:3005) with your browser.

Stop containers
**Stop containers** When you're done using the application, stop the containers by running the command:

```
$ yarn docker-compose:down
$ yarn compose:down
```

## How to Contribute
## How to contribute

To suggest code change, Open an issue or create a pull request.
If you have any suggestions or want to propose code changes, you can open an issue or create a pull request with your proposed changes. Feel free to make any further adjustments or additions to the README to suit your project's specific requirements and conventions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
working_dir: /app
environment:
- PORT=80
- OIDC_ISSUER=$OIDC_ISSUER
- OIDC_ISSUER=$INTERNAL_OIDC_ISSUER
- MONGODB_URI=$MONGODB_URI
ports:
- '3000:80'
Expand All @@ -17,7 +17,7 @@ services:
working_dir: /app
environment:
- PORT=80
- OIDC_ISSUER=$OIDC_ISSUER
- OIDC_ISSUER=$INTERNAL_OIDC_ISSUER
- CLIENT_ID=api
- CLIENT_SECRET=night-wolf
ports:
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "openid-connect-app",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"keywords": [],
"license": "MIT",
"author": "ebrahimmfadae@gmail.com",
"type": "commonjs",
"scripts": {
"docker-compose:up": "docker-compose up -d",
"docker-compose:down": "docker-compose down",
"compose:up": "docker compose up -d",
"compose:down": "docker compose down",
"start:api": "ts-node api/src",
"start:app": "ts-node app/src",
"start:oidc": "ts-node oidc/src",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Gandalf: You shall !not pass!\" && exit 1"
},
"dependencies": {
"@koa/cors": "^3.1.0",
Expand Down

0 comments on commit 673a8ce

Please sign in to comment.