0

I have build an application with NodeJs + ExpressJs. I have file jquery in folder js of public, ex:

http://192.168.2.129:7878/javascripts/jquery.min.js

But how can I config setting Express to get this file jquery when i get this url

http://192.168.2.129:7878/1111/javascripts/jquery.min.js

1 Answer 1

3

From documentation, to add relative 'virtual' path you write following code:

app.use('/1111', express.static('public'));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.