Added basic project structure and Readme
This commit is contained in:
commit
29c80e0fe0
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
||||
/node_modules
|
||||
|
||||
/build
|
||||
|
||||
.env.local
|
||||
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
9
README.md
Normal file
9
README.md
Normal file
@ -0,0 +1,9 @@
|
||||
# QuestionForm Backend
|
||||
|
||||
Backend used with QuestionForm application.
|
||||
|
||||
# Built with:
|
||||
|
||||
- Prisma
|
||||
- Graphql
|
||||
- Graphql-yoga
|
17
package.json
Normal file
17
package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "backend",
|
||||
"version": "1.0.0",
|
||||
"main": "src/index.ts",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"graphql-yoga": "^1.18.3"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "ts-node src/index.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@prisma/cli": "^2.8.0",
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "^4.0.3"
|
||||
}
|
||||
}
|
11
prisma/schema.prisma
Normal file
11
prisma/schema.prisma
Normal file
@ -0,0 +1,11 @@
|
||||
// This is your Prisma schema file,
|
||||
// learn more about it in the docs: https://pris.ly/d/prisma-schema
|
||||
|
||||
datasource db {
|
||||
provider = "sqlite"
|
||||
url = "./dev.db"
|
||||
}
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client-js"
|
||||
}
|
14
src/index.ts
Normal file
14
src/index.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { GraphQLServer } from "graphql-yoga"
|
||||
|
||||
const typeDefs = ``
|
||||
|
||||
const resolvers = {}
|
||||
|
||||
const server = new GraphQLServer({
|
||||
typeDefs,
|
||||
resolvers,
|
||||
})
|
||||
|
||||
server.start(({ port }) =>
|
||||
console.log(`Server is running on http://localhost:${port}`)
|
||||
)
|
5
src/list.test.json
Normal file
5
src/list.test.json
Normal file
@ -0,0 +1,5 @@
|
||||
[
|
||||
{
|
||||
|
||||
}
|
||||
]
|
Loading…
x
Reference in New Issue
Block a user