Update main.js

exclude public directory