Skip to content

Commit

Permalink
Merge pull request #6 from Geode-solutions/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
JulienChampagnol authored Jun 14, 2024
2 parents 66e86ce + 1d40e69 commit e4bd663
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,27 @@



## v0.1.0-rc.1 (2024-06-14)

### Feature

* feat(app): add ping route ([`4106146`](https://github.com/Geode-solutions/GeodeApp-Back/commit/4106146681b731e6df78ffe836e551a9c5adbe18))

### Fix

* fix(server): update run command ([`b390f97`](https://github.com/Geode-solutions/GeodeApp-Back/commit/b390f9765030be8d23332443a17e2cd462950170))

### Unknown

* Merge pull request #5 from Geode-solutions/fix_ping_and_run_command

Fix ping and run command ([`e248223`](https://github.com/Geode-solutions/GeodeApp-Back/commit/e248223d19161aca06674a81569a8fdaa5114a0b))

* revert root ([`55bb056`](https://github.com/Geode-solutions/GeodeApp-Back/commit/55bb056fe20c9d2094a241e28ce12f0bdbb50866))

* ([`7791832`](https://github.com/Geode-solutions/GeodeApp-Back/commit/77918325f07a9b267337831d175e5f9eca533687))


## v0.0.1 (2024-06-03)

### Unknown
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "geodeapp_back"
version = "0.0.1"
version = "0.1.0-rc.1"
dynamic = ["dependencies"]
authors = [
{ name="Geode-solutions", email="[email protected]" },
Expand All @@ -24,7 +24,7 @@ classifiers = [
"Bug Tracker" = "https://github.com/Geode-solutions/geodeapp-back/issues"

[project.scripts]
geodeapp_server = "geodeapp_back.app:run_server"
geodeapp_back = "geodeapp_back.app:run_server"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
Expand Down
16 changes: 10 additions & 6 deletions src/geodeapp_back/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,20 @@ def kill_task():
def errorhandler(e):
return handle_exception(e)


@app.route("/geodeapp/createbackend", methods=["POST"])
def create_backend():
return flask.make_response({"ID": str("123456")}, 200)


@app.route("/", methods=["POST"])
def root():
return flask.make_response({"ID": str("123456")}, 200)

@app.route("/ping", methods=["POST"])
def ping():
LOCK_FOLDER = flask.current_app.config["LOCK_FOLDER"]
if not os.path.exists(LOCK_FOLDER):
os.mkdir(LOCK_FOLDER)
if not os.path.isfile(LOCK_FOLDER + "/ping.txt"):
f = open(LOCK_FOLDER + "/ping.txt", "a")
f.close()
return flask.make_response({"message": "Flask server is running"}, 200)


def run_server():
print(f"Python is running in {FLASK_DEBUG} mode")
Expand Down

0 comments on commit e4bd663

Please sign in to comment.