LogoDevhost

Getting Started

configure devhost in under a minute and ship!

Devhost manages the hosts file, local certificates, http request header modification and tls/ssl for you under the hood, so you can focus on the important things!

Devhost needs 2 permissions to start running, don't worry, it's extremely easy!

You can configure by running this command:

npx devhost@latest

Below is an explanation of what configuration does:

1. Configure local CA

Devhost uses mkcert under the hood, so if you have installed mkcert before, no worries, devhost will use your mkcert ca.

If you've never installed mkcert before:

  1. you can install the CA with mkcert
  2. you can install the CA with Devhost (elevated privilege for Devhost)
   ~$ npx devhost@latest
 Devhost starting...
 Checking Hosts file access...
 Checking mkcert installation...
   Sudo password:

2. Configure write access to Hosts file

Devhost needs write access to the Hosts file to automatically configure the dns resolution for you.

We achieve this by granting write permission to the current user, following the prompted commands from terminal.

For macos:

 Devhost starting...
 Checking Hosts file access...
  Devhost needs write acces to the Hosts file
  please run the following command to grant access
 
  sudo chmod +a 'user:${YOUR_USERNAME}:allow write' /etc/hosts
 
 deleted generated certificates
  devhost stopped gracefully

For windows:

 Devhost starting...
 Checking Hosts file access...
  Devhost needs write acces to the Hosts file
  please run the following command to grant access
 
  sudo chmod +a 'user:${YOUR_USERNAME}:allow write' /etc/hosts
 
 deleted generated certificates
  devhost stopped gracefully

On this page