changes to readme to reflect auth changes (#63)
* changes to readme to reflect auth changes * updated text a bit
This commit is contained in:
@@ -6,18 +6,17 @@ Apollo graphql api server for Photowall
|
||||
Create an .env file (see .env.example for what to set).
|
||||
### Development
|
||||
Run
|
||||
|
||||
```
|
||||
$ npm install
|
||||
$ docker compose build
|
||||
$ docker compose up
|
||||
```
|
||||
|
||||
For browse query testing use Insomnia or similar tool with token from `<url to photowall>/admin/auth/token`
|
||||
For testing use a tool like Insomnia or similar. Server is running on http://localhost:4000/ and to
|
||||
connect you need to use `basic auth` with username and password from "GraphQl Basic Auth" in lastpass.
|
||||
If you wish the Bearer Token used in prodlike environment also works.
|
||||
|
||||
Take the value of the token param and add header in insomnia:Authorization: Bearer <token>. The token is valid for 2-3 hours.
|
||||
|
||||
See context function of src/index.ts for Authentication options for development.
|
||||
If you dont have access to photowall shared lastpass please contact any collegaue.
|
||||
|
||||
### Run prod-like container locally
|
||||
Run
|
||||
@@ -26,6 +25,10 @@ $ docker compose -f docker-compose-prodlike.yml build
|
||||
$ docker compose -f docker-compose-prodlike.yml up
|
||||
```
|
||||
|
||||
Get your AD-token from this path in the browser `<url to photowall>/admin/auth/token`
|
||||
Take the value of the token param and add header in insomnia:Authorization: Bearer <token>.
|
||||
The token is valid for 2-3 hours.
|
||||
|
||||
## Run tests
|
||||
|
||||
Scripts will create the insert sql files for a randomized fake data postgres database. This database is based of the actual db in photowall project.
|
||||
|
||||
Reference in New Issue
Block a user