Some programs are not designed to be run with continuous user input and disconnect from the terminal at the first opportunity. For example, a web server responds to web requests, rather than user input. Mail servers are another example of this type of application. These types of programs are known as daemons. The term daemon comes from Greek mythology and represents an entity that is neither good nor evil, and which invisibly performs useful tasks. This is why the BSD mascot is the cheerful-looking daemon with sneakers and a pitchfork.
Let using upstart:
Create a file named: /etc/init/my-http-server.conf
start on (filesystem)
stop on runlevel 
exec <your command>
mkdir -p /var/run/my/
chown -R my:www-data /var/run/my
# sleep 6
# chmod 776 /var/run/my/.s.my
For more information refer to : upstart documents.
restart commands to control your daemon:
$ start my-http-server
$ stop my-http-server
$ restart my-http-server
For a complete list of available choices to make a daemon process on ubuntu 16.04: see here
I have some additional info: The ubuntu 16.04 comes with systemd.
So, the best practice is to make a systemd daemon. because the rc.d, init.d and upstart will be deprecated very soon!.