feat: Implement authentication with JWT

This commit is contained in:
Faruk AYDIN
2022-03-05 19:58:52 +03:00
committed by Ömer Faruk Aydın
parent f883dd1287
commit c935f3f691
9 changed files with 199 additions and 31 deletions

View File

@@ -10,7 +10,6 @@ import appAssetsHandler from './helpers/app-assets-handler';
import webUIHandler from './helpers/web-ui-handler';
import errorHandler from './helpers/error-handler';
import './config/database';
import authentication from './helpers/authentication';
const app = express();
const port = appConfig.port;
@@ -21,7 +20,6 @@ app.use(morgan);
app.use(express.json());
app.use(express.urlencoded({ extended: false }));
app.use(cors(corsOptions));
app.use(authentication);
app.use('/graphql', graphQLInstance);
webUIHandler(app);