Create event with API and load event details
This commit is contained in:
parent
855477570f
commit
8e5954e0ca
19 changed files with 349 additions and 58 deletions
|
|
@ -2,6 +2,7 @@ require('dotenv').config();
|
|||
|
||||
const { Datastore } = require('@google-cloud/datastore');
|
||||
const express = require('express');
|
||||
const cors = require('cors');
|
||||
|
||||
const package = require('./package.json');
|
||||
|
||||
|
|
@ -20,6 +21,9 @@ const datastore = new Datastore({
|
|||
keyFilename: process.env.GOOGLE_APPLICATION_CREDENTIALS,
|
||||
});
|
||||
|
||||
app.use(cors({
|
||||
origin: 'http://localhost:3000',
|
||||
}));
|
||||
app.use(express.json());
|
||||
app.use((req, res, next) => {
|
||||
req.datastore = datastore;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue