Adnan Rahić
Aug 29, 2017 · 1 min read

Yes. Express can be defined multiple times in different files. In doing so, you can create multiple instances of the Express router. The piece of code you are referring to is creating an instance of the router. The rest of the express object is not needed in this file.

If you have any more questions feel free to ask away. Cheers.

)
    Adnan Rahić

    Written by

    Dev/Avocado at Sematext.com. Co-Founder at Bookvar.co. Author of "Serverless JavaScript by Example"-bit.ly/sls-js. Ex-Local leader at freeCodeCamp Sarajevo.

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade