DB to js file