TypeScript + Prisma + Express API Server 系统

Overview

TypeScript + Prisma + Express API Server 系统

  1. 一键化使用
  2. Docker的应用
  3. Graphql

基于Express的一键搭建模板

  • Makefile
  • docker
  • husky
  • eslint
    • lint-staged
  • prettier
  • TypeScript
    • ts-node
    • tsconfig-paths
  • Express
  • nginx
  • swagger
  • nodemon
  • swc
  • cross-env
  • jest
    • ts-jest
  • pm2
  • cross-env
  • dotenv
    • env.local
  • cors
  • supertest - 用于测试 HTTP 服务器的 SuperAgent 驱动库
  • class-transformer - 允许使用基于装饰器和非装饰器的验证,将普通对象转换为类的某个实例,允许根据标准序列化/反序列化对象
  • bcrypt - 散列密码的库
  • compression - Node.js 压缩中间件
  • helmet - 中间件,通过设置各种header来为express应用提供安全保护
  • hpp - 用于防止 HTTP 参数污染攻击的Express中间件
  • jsonwebtoken - JSON Web Token 实现(对称和非对称)
  • swagger-jsdoc - 该库读取您的JSDoc 注释源代码并生成OpenAPI (Swagger) 规范
  • swagger-ui-express - 此模块允许您基于文件提供从 express自动生成的swagger-uiswagger.json生成的 API 文档。结果是通过路由从 API 服务器托管的 API 的实时文档。
  • winston - 简单且通用的日志库,支持多种传输
  • morgan - node.js 的 HTTP 请求记录器中间件
  • oss
  • prisma
  • envalid - Envalid 是一个小型库,用于验证和访问 Node.js(v8.12 或更高版本)程序中的环境变量
  • graphql - graphql传输方式
  • apollo-server-express - graphql在线测试接口平台

功能介绍

TODO

1. Graphql

  1. 运行docker测试数据库: docker-compose -f docker-compose-dev.yml up --force-recreate, 运行npm run prisma:migrate
  2. 打开: http://localhost:3000/graphql,可以访问在线测试graphql平台
  3. CRUD:
mutation {
    createPost(post: {
    id: "12",
    title: "12",
    content: "12",
  }) {
        id,
        title,
        content
    }
}

query {
  listPosts {
        id,
        title,
        content
  }
}

query {
  getPostById(postId: "8") {
        id,
        title,
        content
  }
}
You might also like...

Monolithic repo for api server, image server, web server

Onsecondary Market Deployed at https://market.onsecondary.com Monolithic repo for api server, image server, web server TODO -use a script to cull expi

Jan 11, 2022

A basic example of a GraphQL API built with NestJS, Prisma and TypeScript

A progressive Node.js framework for building efficient and scalable server-side applications. Description Nest framework TypeScript starter repository

Dec 18, 2022

Prisma 2+ generator to emit a JSON file that can be run with json-server

Prisma 2+ generator to emit a JSON file that can be run with json-server

Prisma JSON Server Generator A Prisma generator that automates creating a JSON file that can be run as a server from your Prisma schema. Explore the o

Jan 7, 2023

WPPConnect/WA-JS API SERVER is a small api server to provide url preview for @wppconnect/wa-js library

WPPConnect/WA-JS API SERVER WPPConnect/WA-JS API SERVER is a small api server to provide url preview for @wppconnect/wa-js library Our online channels

Aug 11, 2022

Example api, in Portuguese, to show very basic fundamentals of an express server.

Servidor de texto Aqui é um exemplo simples de como usar o express para servir um valor da memória do servidor para o front como resposta a cada requi

Jan 7, 2022

An express-like API for bun server

An express-like API for bun server

🧄 bunrest What is bunrest 👀 bunrest is an ExpressJs-like API for bun http server. Features ⚡ BLAZING FAST. Bun is super fast... 0️⃣ dependencies, wo

Jan 2, 2023

Fullstack Turborepo starter. Typescript, Nestjs, Nextjs, Tailwind, Prisma, Github Actions, Docker, And Reverse proxy configured

Turborepo (NestJS + Prisma + NextJS + Tailwind + Typescript + Jest) Starter This is fullstack turborepo starter. It comes with the following features.

Jan 9, 2023

Next.js + Tailwind + Typescript + Prisma + NextAuth starter project

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Jan 3, 2023

Node.js TypeScript project demonstrating a Prisma integration with PostgreSQL

Prisma with PostgreSQL, TypeScript, Serverless and Parameter Store This project is the outcome of following the Prisma Getting Started guide. In addit

Aug 28, 2022
Owner
wenxuan feng
I'm soup.
wenxuan feng
RepoProvas API, a system for sharing tests between students, built with Typescript, Node.js, Express, Prisma and Postgres.

Repoprovas Built With ?? Description RepoProvas API, a system for sharing tests between students, built with Typescript, Node.js, Express, Prisma and

Lucas Lima 3 Dec 13, 2022
An API built for an invoices manager app using TypeScript and Prisma with Node and Express.

Invoices App API An API built for the invoices manager app using TypeScript and Prisma with Node and Express. Run locally To run locally, you need to

Waleed Alfaifi 4 Oct 17, 2022
Prisma +2 generator to emit Yup schemas from your Prisma schema

Prisma Yup Generator Automatically generate Yup schemas from your Prisma Schema, and use them to validate your API endpoints or any other use you have

Omar Dulaimi 31 Dec 24, 2022
Prisma 2+ generator to emit Joi schemas from your Prisma schema

Prisma Joi Generator Automatically generate Joi schemas from your Prisma Schema, and use them to validate your API endpoints or any other use you have

Omar Dulaimi 26 Dec 24, 2022
Prisma +2 generator to emit a tRPC shield from your Prisma schema

Prisma tRPC Shield Generator Automatically generate a tRPC Shield from your Prisma Schema. Updates every time npx prisma generate runs. Table of Conte

Omar Dulaimi 27 Dec 24, 2022
Prisma 2+ generator to emit Zod schemas from your Prisma schema

Prisma Zod Generator Automatically generate Zod schemas from your Prisma Schema, and use them to validate your API endpoints or any other use you have

Omar Dulaimi 212 Dec 27, 2022
This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io)

Alternative Prisma Data Proxy This is a library to alternate and self-host the Prisma Data Proxy (cloud.prisma.io). In order to deploy your project to

AijiUejima 60 Dec 28, 2022
Express.js framework boilerplate with TypeScript, Prisma, ESLint, Husky and Jest

Setup a Node.js project with Typescript, Prisma ESLint, Prettier, Husky Node.js boilerplate with Express.js, TypeScript, Prisma, ESLint, Prettier, Hus

Smart Geek 6 Dec 12, 2022
Back-end desenvolvido com NodeJS, TypeScript, Prisma e Express para prover dados para as aplicações em desenvolvimento.plicações do evento NLW eSports.

NLW eSports Back-End Aplicação back-end para surprir as necessidades de dados das demais plataformas desenvolvidas que são citadas mais abaixo. Este s

Felippe Rian 2 Sep 17, 2022
Create a maintainable and scalable Node.js GraphQL API with TypeScript, Express, Mongoose and Apollo Server.

Set up and build a Node.js GraphQL API using Typescript, Express, Mongoose with a maintainable and scalable structure

Adam Khomsi 7 Nov 4, 2022