小编JER*_*RRY的帖子

Mongodb安装失败,运行mongod

我已经下载了最新版本的mongodb,并已将文件移动并重命名为mongodb到目录usr/local/mongodb.当我尝试运行mongod时,我得到以下错误

`./bin/mongod --help` for help and startup options
Sun Apr 15 18:08:25 [initandlisten] MongoDB starting : pid=8801 port=27017 dbpath=/data/db/ 64-bit host=Hanss-MacBook-Air.local
Sun Apr 15 18:08:25 [initandlisten] db version v2.0.4, pdfile version 4.5
Sun Apr 15 18:08:25 [initandlisten] git version: 329f3c47fe8136c03392c8f0e548506cb21f8ebf
Sun Apr 15 18:08:25 [initandlisten] build info: Darwin erh2.10gen.cc 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40
Sun Apr 15 18:08:25 [initandlisten] options: {}
Sun Apr 15 18:08:25 [initandlisten] exception in initAndListen: …
Run Code Online (Sandbox Code Playgroud)

mongodb

21
推荐指数
1
解决办法
2万
查看次数

lua socket POST

我很难使用lua socket通用POST.我正试图用身体发布到网上.但我得到的身体输出是1.这是我的代码

local http = require "socket.http"
local ltn12 = require "ltn12"
local util = require "util"
    local reqbody = "anid=&protocol=1&guid=dfe49e55b63f2cf93eb9aabe44b6d9dc5286bbbedfcbf1c75b95f7a4f7439029&d_type=phone&os_version=6.1&ate=1&asid=079ABF64-A23A-4E3B-9000-19A4A608CCBE&affiliate=&modin=7c78d075f379db2f40c9f68df857cb87&os=ios&d_id=107b2734fdb7898251f62d229168484a9d14f7fb654d02d957b30c9f22bb094c&d_code=1E5D02FF-63F3-43A0-A2BF-80E63E00F76C&pn_device_id=&name_hint=iPhone%20Simulator&d_sig=dfe49e55b63f2cf93eb9aabe44b6d9dc5286bbbedfcbf1c75b95f7a4f7439029&hdid=62624a01f8715f2b838224a4a285746d&tracker=&appid=536381662&odin=1da61c680b672c4e114df45cd5f8f0aa9b088338&model=iPhone%20Simulator&ver=15&campaign=&imei=&store_type=apple&"
    local respbody = {} 
    local  body, code, headers, status = http.request {
        method = "POST",
        url = "https://freshdeck.idle-gaming.com/api/guest_session/",
        source = ltn12.source.string(reqbody),
        headers = 
                {
                        ["Accept"] = "*/*",
                        ["Accept-Encoding"] = "gzip, deflate",
                        ["Accept-Language"] = "en-us",
                        ["Content-Type"] = "application/x-www-form-urlencoded",
                        ["content-length"] = string.len(reqbody)
                },
        sink = ltn12.sink.table(respbody)
    }

    LOGINFO('body:' .. tostring(body))
    LOGINFO('code:' .. tostring(code))
    LOGINFO('headers:' .. util.tableToString(headers))
    LOGINFO('status:' .. tostring(status)) …
Run Code Online (Sandbox Code Playgroud)

sockets post lua http

13
推荐指数
1
解决办法
3万
查看次数

为什么我们不能在mongodb中定义自己的主键?

_id字段被保留供主键mongodb.但为什么这样mongodb设计呢?我可以自己定义主键吗?

primary-key mongodb

4
推荐指数
1
解决办法
7801
查看次数

标签 统计

mongodb ×2

http ×1

lua ×1

post ×1

primary-key ×1

sockets ×1