Ready for deployment

This commit is contained in:
Ben Grant 2021-03-05 05:23:20 +11:00
parent 76a36ed35f
commit f9c216ad00
10 changed files with 200 additions and 147 deletions

View file

@ -22,7 +22,7 @@ const datastore = new Datastore({
});
app.use(cors({
origin: 'http://localhost:3000',
origin: process.env.NODE_ENV === 'production' ? 'https://crab.fit' : 'http://localhost:3000',
}));
app.use(express.json());
app.use((req, res, next) => {