我正在尝试在c9.io中运行node express但是我遇到问题它给了我这个错误我无法弄明白。我收到此错误消息。
$ node app.js
Server is running
/home/ubuntu/workspace/RESTful Routing/RESTfulBlogApp/node_modules/mongodb/lib/server.js:242
process.nextTick(function() { throw err; })
^
Error: getaddrinfo ENOTFOUND localhost.restful_blog_app localhost.restful_blog_app:27017
at errnoException (dns.js:27:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:78:26)
var bodyParser = require("body-parser"),
mongoose = require("mongoose"),
express = require("express"),
app = express();
mongoose.connect("mongodb://localhost.restful_blog_app");
app.set("view engine", "ejs");
app.use(express.static("public"));
app.use(bodyParser.urlencoded({extended: true}));
app.listen(process.env.PORT, process.env.IP, function(){
console.log("Server is running");
});
答案 0 :(得分:0)
我认为这是public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}
public void ShowForm(List<EDIFile> EDIFiles)
{
DataGridView dataGridView1 = new DataGridView();
dataGridView1.AutoGenerateColumns = true;
Controls.Add(dataGridView1);
dataGridView1.DataSource = EDIFiles;
this.ShowDialog();
}
}
答案 1 :(得分:0)
您还应该记得在运行服务器之前启动数据库。如果您仍然遇到问题,您应该尝试将localhost更改为127.0.0.1。