#!/usr/bin/env python3

from flask import Flask, jsonify, request
# import redis
# from redis.commands.json.path import Path
import secrets
from werkzeug import serving
import os



app = Flask(__name__)

COUNTER = 0

@app.route("/nefcallbacks", methods=["POST"])
def nefcallback():
    global COUNTER 
    COUNTER += 1
    print(f"Notification received from NEF: {COUNTER}")

    return jsonify(message="Receive message"), 200


if __name__ == '__main__':
    serving.run_simple('0.0.0.0', 8080, app)