fixes
This commit is contained in:
parent
c8f68b7486
commit
e5126a4aca
6 changed files with 56 additions and 288 deletions
|
|
@ -7,7 +7,7 @@ import 'dotenv/config';
|
|||
import express from 'express';
|
||||
import fs from 'fs';
|
||||
import { GraphQLJSON } from 'graphql-scalars';
|
||||
import https from 'https';
|
||||
import http from 'http';
|
||||
import path from 'path';
|
||||
import ViteExpress from 'vite-express';
|
||||
import { toAppConfig } from './config';
|
||||
|
|
@ -18,11 +18,16 @@ import { getIdentityContext, IdentityContext } from './identity';
|
|||
export const config = toAppConfig();
|
||||
|
||||
const __dirname = import.meta.dirname;
|
||||
const key = fs.readFileSync(path.join(__dirname + '../../../certs/selfsigned.key'));
|
||||
const cert = fs.readFileSync(path.join(__dirname + '../../../certs/selfsigned.crt'));
|
||||
|
||||
// todo - make built-in ssl conditional
|
||||
// const key = fs.readFileSync(path.join(__dirname + '../../../certs/selfsigned.key'));
|
||||
// const cert = fs.readFileSync(path.join(__dirname + '../../../certs/selfsigned.crt'));
|
||||
|
||||
const app = express();
|
||||
const server = https.createServer({ key, cert }, app);
|
||||
|
||||
// todo - make built-in ssl conditional
|
||||
// const server = https.createServer({ key, cert }, app);
|
||||
const server = http.createServer(app);
|
||||
|
||||
const typeDefs = fs.readFileSync(path.join(__dirname, 'graphql', 'schema.graphql'), 'utf8');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue