Phost 用Golang构建的终端应用程序

Phost 用Golang构建的终端应用程序

Go 命令行/控制台

详细介绍

Phost

Phost is a terminal application built with Go lang. The purpose of this was self educative and to create an easy way to add new local host domains, with .dev extension. This can be forked and changed to work with Windows and Linux to.

Instalation

First of all you should fork this project, and then change the default constant variables for your project. Just fork this and then go to lines number 8 and 9. You might want to change the path of line 41 to.

$ go get github.com/your-vendor-name/phost

Usage

$ phost host-name folder-name

Example: phost my-app my-app.com/public

This will generate the necessary code on each file.

Hosts:

127.0.0.1    my-app.dev

Vhosts:

<VirtualHost *:80>
	DocumentRoot "/Users/my-user/www/my-app.com/public"
	ServerName my-app.dev
</VirtualHost>

Do not forget to restart your server to take changes.