mongod --dbpath /usr/local/var/mongodb
2018-07-03T10:50:12.444+0800 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable TLS 1.0 specify --sslDisabledProtocols "none"
2018-07-03T10:50:12.457+0800 I CONTROL [initandlisten] MongoDB starting : pid=44555 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=huhaifengdeMacBook-Pro.local
2018-07-03T10:50:12.457+0800 I CONTROL [initandlisten] db version v4.0.0
2018-07-03T10:50:12.457+0800 I CONTROL [initandlisten] git version: 3b07af3d4f471ae89e8186d33bbb1d5259597d51
2018-07-03T10:50:12.457+0800 I CONTROL [initandlisten] allocator: system
2018-07-03T10:50:12.458+0800 I CONTROL [initandlisten] modules: none
2018-07-03T10:50:12.458+0800 I CONTROL [initandlisten] build environment:
2018-07-03T10:50:12.458+0800 I CONTROL [initandlisten] distarch: x86_64
2018-07-03T10:50:12.458+0800 I CONTROL [initandlisten] target_arch: x86_64
2018-07-03T10:50:12.458+0800 I CONTROL [initandlisten] options: { storage: { dbPath: "/usr/local/var/mongodb" } }
2018-07-03T10:50:12.458+0800 I STORAGE [initandlisten] Detected data files in /usr/local/var/mongodb created by the "wiredTiger" storage engine, so setting the active storage engine to "wiredTiger".
2018-07-03T10:50:12.458+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7680M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),statistics_log=(wait=0),verbose=(recovery_progress),
2018-07-03T10:50:13.065+0800 I STORAGE [initandlisten] WiredTiger message [1530586213:65896][44555:0x7fffa9ffe380], txn-recover: Main recovery loop: starting at 10/5888
2018-07-03T10:50:13.160+0800 I STORAGE [initandlisten] WiredTiger message [1530586213:160125][44555:0x7fffa9ffe380], txn-recover: Recovering log 10 through 11
2018-07-03T10:50:13.224+0800 I STORAGE [initandlisten] WiredTiger message [1530586213:224134][44555:0x7fffa9ffe380], txn-recover: Recovering log 11 through 11
2018-07-03T10:50:13.273+0800 I STORAGE [initandlisten] WiredTiger message [1530586213:273601][44555:0x7fffa9ffe380], txn-recover: Set global recovery timestamp: 0
2018-07-03T10:50:13.347+0800 I RECOVERY [initandlisten] WiredTiger recoveryTimestamp. Ts: Timestamp(0, 0)
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten]
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten]
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** WARNING: This server is bound to localhost.
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** Remote systems will be unable to connect to this server.
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** Start the server with --bind_ip <address> to specify which IP
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** addresses it should serve responses from, or with --bind_ip_all to
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** bind to all interfaces. If this behavior is desired, start the
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** server with --bind_ip 127.0.0.1 to disable this warning.
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten]
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten]
2018-07-03T10:50:13.386+0800 I CONTROL [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
2018-07-03T10:50:13.427+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory "/usr/local/var/mongodb/diagnostic.data"
2018-07-03T10:50:13.431+0800 I NETWORK [initandlisten] waiting for connections on port 27017
const express = require("express")
const mongoose = require("mongoose")
//mongo
const DB_URL = "mongodb://localhost:27017/"
mongoose.connect(DB_URL)
mongoose.connection.on("connected", function(){
console.log("mongo connect success!")
})
// app
const app = express()
app.get("/", function (req, res) {
res.send("<h1>Hello World1e23</h1>")
})
app.get("/data", function(req, res) {
res.json({name: "hhf12ees3", type: "IT"})
})
app.listen(9093, function(){
console.log("Node app start at port 9093")
})
report problem [nodemon] app crashed-waiting for file changes before starting.
how to solve