Adonis serve --domain (not option)


#1

I’m trying to get hotel up and running and when I try to run the server using:

adonis serve --domain=yardstick@http://localhost:3333

I get this error:

  error: unknown option `--domain'

I’m not sure why this would be the case.

Any help would be appreciated


#2

Did you solve your problem? If yes, can you please share us how you did that


#3

maybe try this https://adonisjs.com/docs/4.1/routing#_routing_domains

https://adonisjs.com/docs/4.1/routing#_domain


#4

Sorry, I didn’t see the notification on your reply.

No, I was not able to get hotel working on my comp, so I used nginx as a reverse proxy. This works very well, but is not the easiest to implement.


#5

Well, hotel is very easy to setup.
Simply just install hotel and configure it using this link, but ignore the part Integrate with AdonisJs

if you have problem in setting up proxy, you can only use firefox to use proxy ( it’s easy )

paste this link

 http://localhost:2000/proxy.pac

in

Preferences > Advanced > Network > Connection > Settings > Automatic proxy URL configuration

add your desired domains to hotel like this

~$ hotel add http://127.0.0.1:3333 --name my-website1
~$ hotel add http://127.0.0.1:3333 --name my-website2

that’s it…

now just run your adonis app

adonis serve --dev

you can now access your domains using

http://my-website1.localhost
http://my-website2.localhost

#6

Ya, it should be. I was able to set it up on my other computer, but I couldn’t on my dev.