Update and rename frontend.js to middleend.js