Repository navigation
|
Let's say my code architecture is How can i serve my static files depending of the domain used (localhost/127.0.0.1) |
Replies: 6 comments 1 reply
What I understood is this?app.use(express.static(path.join(__dirname, 'public'))); |
|
Not what i asked. How can i do that |
127.0.0.1/ and localhost is the same do you want to do 2 server express and share static files? |
|
separate the files in different folders since they would be different servers example: and if you want to have something in common you can use paths to use some files like |
I want to do that in a single Server. This is the point of my issue. |
|
Yes you can do that Try this codes; |
Yes you can do that
Try this codes;