Backend implementation, can now save routes to the db.