Tag: vagrantfile

使用NodeJs和stream浪汉

我有这个stream浪文件 VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.box = "hashicorp/precise32" config.vm.network "forwarded_port", guest: 80, host: 3000 config.vm.network "private_network", ip: "192.168.33.11" end 我的目标是运行nodejs的虚拟机。 我已经正确安装了节点。 在“vagrant ssh”之后,我用这个内容创build了一个“index.js”文件: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).listen(3000, '127.0.0.1'); console.log('Server running at http://127.0.0.1:3000/'); 从vagrant @ precise32:/ vagrant $,当我运行“curl localhost:3000”时,我得到“Hello world”。 但是… 我需要做什么,打开我的本地浏览器,并获得相同的“你好世界”? 如果我试图“curl”我的虚拟机的IP,我得到这个: $ […]

stream浪汉(Saltstack)如何安装package.json与盐状态?

我想用stream浪汉“stream浪”来安装我的环境。 我做了代码来安装模块,但我想安装package.json文件,以及如何? 我的模块安装程序代码如下所示: mongodb: pkg: – installed service: – running nodejs: pkg: – installed npm: pkg: – installed git: pkg: – installed build-essential: pkg: – installed bower: npm: – installed nodemon: npm: – installed