在Windows上使用Ubuntu上的Bash AppEngine SDK for Go
发布时间:2020-12-14 04:26:01 所属栏目:Windows 来源:网络整理
导读:我试图在 Windows上的Ubuntu上使用Bash中的AppEngine SDK for Go,但是我有一个错误.这是我的代码. 的app.yaml runtime: goapi_version: go1handlers:- url: /.* script: _go_app main.go package mainimport ( "net/http" "github.com/labstack/echo" "githu
我试图在
Windows上的Ubuntu上使用Bash中的AppEngine SDK for Go,但是我有一个错误.这是我的代码.
的app.yaml runtime: go api_version: go1 handlers: - url: /.* script: _go_app main.go package main import ( "net/http" "github.com/labstack/echo" "github.com/labstack/echo/engine/standard" ) func init() { e := echo.New() e.GET("/",func(c echo.Context) error { return c.String(http.StatusOK,"Hello,World!") }) s := standard.New("") s.SetHandler(e) http.Handle("/",s) } 这是错误和命令. surface@DESKTOP-U7N4QNQ:~/projects$goapp serve INFO 2016-08-09 14:24:35,574 devappserver2.py:769] Skipping SDK update check. INFO 2016-08-09 14:24:35,665 api_server.py:205] Starting API server at: http://localhost:38070 INFO 2016-08-09 14:24:35,670 api_server.py:648] Applying all pending transactions and saving the datastore INFO 2016-08-09 14:24:35,671 api_server.py:651] Saving search indexes Traceback (most recent call last): File "/home/surface/dev/go_appengine/dev_appserver.py",line 89,in <module> _run_file(__file__,globals()) File "/home/surface/dev/go_appengine/dev_appserver.py",line 85,in _run_file execfile(_PATHS.script_file(script_name),globals_) File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 1040,in <module> main() File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 1033,in main dev_server.start(options) File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/devappserver2.py",line 824,in start self._dispatcher.start(options.api_host,apis.port,request_data) File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/dispatcher.py",line 194,in start _module.start() File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/module.py",line 1180,in start self._watcher.start() File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/inotify_file_watcher.py",line 220,in start self._add_watch_for_path(directory) File "/home/surface/dev/go_appengine/google/appengine/tools/devappserver2/inotify_file_watcher.py",line 205,in _add_watch_for_path raise error OSError: [Errno 22] EINVAL: '/home/surface/projects' error while running dev_appserver.py: exit status 1 surface@DESKTOP-U7N4QNQ:~/projects$ 我不知道解决这个问题. 解决方法
我自己得到了答案.
这个问题发生在Windows上的Ubuntu上的Bash中. 它不支持File Watcher. (已经有人提出了问题https://github.com/Microsoft/BashOnWindows/issues/216) 因此,我使用dev_appserver.py和–use_mtime_file_watcher = true选项. 这是我完整的命令. $dev_appserver.py –use_mtime_file_watcher = true / home / surface / projects / 谢谢. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- windows文件命名特性利用漏洞
- 生产环境下扩充Windows集群的共享磁盘
- windows-server-2008 – 如何启用命令行远程访问Windows Se
- windows-phone-7 – 有没有办法在Windows Phone 7模拟器上模
- windows – 分布式文件系统复制(DFSR)如何与后台智能传输服
- windows-server-2012 – Windows 2012 Autounattend仍在询问
- NTFS-$Volume丢失导致分区无法正常打开一例
- laravel homestead共享文件夹的主机路径在Windows 7上丢失错
- windows-server-2012 – 将Windows Server 2012 R2降级为WS
- windows+appium自动化,Desired Capabilities参数填写,查看
推荐文章
站长推荐
热点阅读