Skip to content

Commit

Permalink
とりあえずdeployできるようにしたつもり
Browse files Browse the repository at this point in the history
  • Loading branch information
jiro4989 committed Nov 28, 2019
1 parent c96d829 commit e672406
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/shellgei_web.nim
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import jester, uuids
import asyncdispatch, os, osproc, strutils, json, random
import asyncdispatch, os, osproc, strutils, json, random, logging
from strformat import `&`

import jester, uuids

addHandler(newConsoleLogger(lvlInfo, fmtStr = verboseFmtStr, useStderr = true))

type
RespShellgeiJSON* = object
code*: string
Expand Down Expand Up @@ -45,11 +48,13 @@ router myrouter:
let env = @"env"
case env
of "prd":
discard
if 0 != execShellCmd("deploy"):
error "デプロイに失敗: Command = deploy"
of "stg":
discard
if 0 != execShellCmd("deploy"):
error "デプロイに失敗: Command = deploy"
else:
discard
error &"不正なenv: env = {env}"

proc main =
var port = getEnv("API_PORT", "8080").parseInt().Port
Expand Down

0 comments on commit e672406

Please sign in to comment.