Set Up environment
.env. This provides basic environment variables which your Hireath install may need to know about.
cp .env.example .env
Ensure Storage is Writable
If you’re just testing things out and are running PHP’s built in web server as the same user that you installed Hiraeth as, you probably don’t need to worry too much about this. If not, the examples below are just examples and we assume you know enough about how to admin your own servers.
Hiraeth needs a place to write files. Since you’re probably running it through a web server, you’ll want to make sure that your webserver can write to
storage in the application root. On Linux systems, we strongly suggest the use of ACLs:
setfacl -R -dm u:www-data:rwx storage setfacl -R -m u:www-data:rwx storage chmod -R g+w storage
For Linux or Unix-based systems that don’t have this option, you may need to change the group:
chgrp -R www-data storage chmod -R g+w storage
Windows users, you’re on your own.
Using PHP’s Built In Web Server
Hiraeth provides a passthru call to PHP’s built in web server that allows you to quickly start a local development server. To start this local server with your application’s
public as the document root, simply execute (from your application root):
Did you install
hiraeth/boostrap? If not, you’re not going to have an
public/index.php. You’ll need to write a custom entry point.
You can then visit http://localhost:8080/ to hit the
public/index.php entry point. Other pages throughout this documentation will use this as a reference URL for examples.
If you want to change the host and port which the server runs on you can modify your
.env and add something like:
[SERVER] HOST = myhost.local PORT = 3000