Javascript implementation

Bad direction. Postgres for a glorified flat file?  Why?