Question: I have created a nodejs express service. When you make it live by running something like `nodemon server.js` then it runs on `your-ip:port-you-listened-on` (`app.listen(3000);`)

**How do I get me nodejs service to run on a host name though?** I need this for my certificate to work. For example, I want it to run on `https://test.mydomain.com`, so a call would be something like `https://test.mydomain.com/login`

Answer: 
With your approach, you need to reset the iterator over `y` each time you try a new value in `x`.

It might be clearer like this:

```
for i in x:
  if i in dic:
    text.append(i)
  else:
    for j in y:
      concatenated = i + j
      if concatenated in dic:
        text.append(concatenated)

```

The `for j in y` tries all the things in `y`, otherwise it moves on each time, and never looks back.
Does this work for you?

```
x=['casa','lo','pre','computer']
y=['music','sun','ve','sident','house']
dic=['sunday','love','president','house','computer']

possibles = []
possibles += x
possibles += y # if you want the house...

hits = []
for a in x:
    for b in y:
        possibles.append(a+b)
for a in y:
    for b in x:
        possibles.append(a+b)

for p in possibles:
    if p in dic:
        hits.append(p)

print(p)

```