I did! Basically, it all came down to needing to pass in various options that were CORS related to both my frontend and backend. My main issue was that I was using apollo-server-express with cors middleware, but didn;'t realize that apollo-server-express had some cors built in and both were conflicting. I ended up doing:
server.applyMiddleware({app,path:'/',cors:false,// disables the apollo-server-express cors to allow the cors middleware use})
Then my cors middleware worked and the tokens/headers were all getting passed correctly.
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
ThermoFisher Scientific Part Descriptions
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
You can start the application by:
npm install from both frontend and backend folders.
You'll need to create a Prisma account and deploy to prisma from backend.
Create a .env file in backend with:
DB_ENDPOINT (set to your prisma endpoint)
DB_SECRET (make a random secret for prisma to use)
USER_SECRET (a random secret for the app to use)
COOKIE_SECRET (something random for cookie generation)
FRONTEND_URL=http:localhost:3000
APP_SECRET (something random for the app to use)
Make .env in frontend
NODE_ENV=development
npm run dev from both frontend (localhost: 3000) and backend (localhost:4000)
I did! Basically, it all came down to needing to pass in various options that were CORS related to both my frontend and backend. My main issue was that I was using apollo-server-express with cors middleware, but didn;'t realize that apollo-server-express had some cors built in and both were conflicting. I ended up doing:
Then my cors middleware worked and the tokens/headers were all getting passed correctly.
You can see my codebase here
ryanmdoyle / thermoFisherSci
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
ThermoFisher Scientific Part Descriptions
Part Inventory description tracker/editor/exporter. Allows input and exiting of part descriptions in multiple languages to export as HTML to be used in web applications.
You can start the application by:
.
Thank you Ryan :)