first commit

This commit is contained in:
编码猿
2024-09-27 01:16:59 +08:00
commit 885e756114
10 changed files with 674 additions and 0 deletions

17
index.js Normal file
View File

@@ -0,0 +1,17 @@
// server.js
const express = require('express');
const expressGraphql = require('express-graphql');
const app = express();
const schema = require('./schema/user');
app.use('/graphql', expressGraphql({
schema,
graphiql: true
}));
app.get('/', (req, res) => res.end('index'));
app.listen(8000, (err) => {
if(err) {throw new Error(err);}
console.log('*** server started ***');
});