Skip to content

Commit

Permalink
moving docs to specific folder
Browse files Browse the repository at this point in the history
  • Loading branch information
JulienParis committed Jun 9, 2019
1 parent e1d1943 commit ce66b40
Show file tree
Hide file tree
Showing 102 changed files with 65 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,4 +122,4 @@ venv.bak/
.mypy_cache/

# Jekyll docs
/_site
docs/_site
24 changes: 12 additions & 12 deletions auth_api/api/api_auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
api_auth/__init__.py
- provides the API endpoints for consuming and producing
REST requests and responses
REST requests and responses
"""

from auth_api.api import *
Expand All @@ -22,25 +22,25 @@
### create API
# api = Api( blueprint,
api = Custom_API( blueprint,
title = "TokTok / Auth API : AUTH SERVER",
version = app.config["APP_VERSION"],
description = app.config["CODE_LINK"] + " : auth server / manages tokens",
doc = '/documentation',
default = 'login',
authorizations = auth_check,
# security='apikey' # globally ask for apikey auth
title = "TokTok / Auth API : AUTH SERVER",
version = app.config["APP_VERSION"],
description = app.config["CODE_LINK"] + " : auth server / manages tokens",
doc = '/documentation',
default = 'login',
authorizations = auth_check,
# security='apikey' # globally ask for apikey auth
)


### errors handlers

@api.errorhandler
def default_error_handler(e):
message = 'An unhandled exception occurred.'
log.exception(message)
message = 'An unhandled exception occurred.'
log.exception(message)

if not app.config["FLASK_DEBUG"]:
return {'message': message}, 500
if not app.config["FLASK_DEBUG"]:
return {'message': message}, 500


# @api.errorhandler(NoResultFound)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions _posts/2019-04-01-git.md → docs/_posts/2019-04-01-git.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ git init .

### add remote repo links
```
git remote add origin https://github.com/entrepreneur-interet-general/toktok_frontend.git
git remote add origin https://github.com/co-demos/toktok.git
```

-------------

#### if need for reset remote’s url :
```
git remote set-url origin https://github.com/entrepreneur-interet-general/toktok_frontend.git
git remote set-url origin https://github.com/co-demos/toktok.git
```

------------
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,17 @@ At the CLI level you can use :
@click.option('--https', default="false", nargs=1, help="The <https> mode you want the app to run on : true | false")
```

### the variables in `.env` files

Within the `.env`files you can change the following variables :

- `example.env.global`

``` bash
### GLOBAL ENV VARS
APP_VERSION=0.4
RUN_MODE=default
DOCKER_MODE=docker_off
AUTH_MODE=default
Expand All @@ -198,13 +204,33 @@ SERVER_NAME_TEST=True
### MONGO DB RELATED
MONGODB_MODE=local
### AUTH SPECS ENV VARS
RSA_MODE=no
ANOJWT_MODE=no
ANTISPAM_MODE=no
ANTISPAM_VAL=my-string-to-check
SECURITY_PASSWORD_SALT=a-secret-security-pwd-salt
JWT_SECRET_KEY=a-secret-jwt-key
JWT_ACCESS_TOKEN_EXPIRES=720
JWT_REFRESH_TOKEN_EXPIRES=10
JWT_ANONYMOUS_REFRESH_TOKEN_EXPIRES=15
JWT_CONFIRM_EMAIL_REFRESH_TOKEN_EXPIRES=7
JWT_RESET_PWD_ACCESS_TOKEN_EXPIRES=1
JWT_RENEW_REFRESH_TOKEN_AT_LOGIN=true
REDIRECTION_FRONT_PREPROD=http://preprod.toktok.co-demos.com
REDIRECTION_FRONT_PROD=http://toktok.co-demos.com
```

- `example.env.mongodb`

``` bash
### MONGODB ENV VARS
### to build mongodb URI
MONGO_ROOT_LOCAL=localhost
MONGO_ROOT_DOCKER=host.docker.internal
MONGO_PORT_LOCAL=27017
Expand All @@ -229,4 +255,20 @@ MONGO_COLL_TAGS=tags
MONGO_COLL_USERS=users
MONGO_COLL_LICENCES=licences
MONGO_COLL_JWT_BLACKLIST=jwt_blacklist
```


- `example.env.mailing`

``` bash
### MAILING ENV VARS
MAIL_SERVER=smtp.googlemail.com
MAIL_PORT=465
MAIL_USE_TLS=False
MAIL_USE_SSL=True
[email protected]
MAIL_PASSWORD=XXXXX
[email protected],[email protected]
[email protected]
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
17 changes: 2 additions & 15 deletions example.env.global
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,17 @@ APP_VERSION=0.4
RUN_MODE=dev_email
DOCKER_MODE=docker_off
DEBUG=true
HTTPS_MODE=false

DOMAIN_ROOT=localhost
DOMAIN_PORT=4100
SERVER_NAME_TEST=True

SECRET_KEY=a-very-secret-key

HTTPS_MODE=false
SERVER_NAME_TEST=True


### MONGODB ENV VARS

MONGODB_MODE=local

MONGO_ROOT_LOCAL=localhost
MONGO_ROOT_DOCKER=host.docker.internal

MONGO_PORT_LOCAL=27017

MONGO_COLL_TAGS=tags
MONGO_COLL_USERS=users
MONGO_COLL_LICENCES=licences
MONGO_COLL_JWT_BLACKLIST=jwt_blacklist


### AUTH SPECS ENV VARS
RSA_MODE=no
Expand Down
5 changes: 5 additions & 0 deletions example.env.mongodb
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
### MONGODB ENV VARS
### to build mongodb URI

MONGO_ROOT_LOCAL=localhost
MONGO_ROOT_DOCKER=host.docker.internal
MONGO_PORT_LOCAL=27017

MONGO_DBNAME=toktok
MONGO_DBNAME_TEST=toktok-test
Expand Down

0 comments on commit ce66b40

Please sign in to comment.