Giter VIP home page Giter VIP logo

simple-type-next-express-boilerplate's Introduction

Simple TypeScript + Next.js + Custom Express Server Boilerplate

JavaScript Version: simple-next-express-boilerplate

/api -> Express Server

* -> Next RequestHandler


Script

  • dev - Next Dev (nodemon --exec ts-node --project tsconfig.server.json server/server.ts)
  • dev:api - Only /api requests work (nodemon --exec ts-node --project tsconfig.server.json server/server-dev-api.ts)
  • build - Next Build (next build && tsc --project tsconfig.server.json)
  • start - Next Start (cross-env NODE_ENV=production node dist/server.js)
  • pm2 - Run with pm2 Cluster Mode (pm2 start ecosystem.config.js --env production)
  • pm2:dev - Run with pm2 Cluster Mode(dev) (pm2 start ecosystem.config.js)

Docker

Default Tag: simple-type-next-express

Test Run Command: docker run -p 3000:3000 simple-type-next-express

  • build - ./cicd/build.sh
  • build(with pm2) - ./cicd/build-pm2.sh

File Tree

.
├── LICENSE
├── README.md
├── cicd
│   ├── Dockerfile
│   ├── Dockerfile-pm2
│   ├── build-pm2.sh
│   └── build.sh
├── ecosystem.config.js
├── lib
│   └── utils
│       └── useRequest.ts
├── next-env.d.ts
├── next.config.js
├── nodemon.json
├── package-lock.json
├── package.json
├── pages
│   ├── [id].tsx
│   ├── _app.tsx
│   ├── _document.tsx
│   └── index.tsx
├── public
│   └── robots.txt
├── server
│   ├── api
│   │   └── user
│   │       └── getUser.ts
│   ├── routes
│   │   ├── apiRouter.ts
│   │   └── userRouter.ts
│   ├── server-dev-api.ts
│   └── server.ts
├── tsconfig.json
└── tsconfig.server.json

ToDo

  • ETC...

simple-type-next-express-boilerplate's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar jaeseokim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

redrebel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.