Skip to content

Preconfigured boilerplate for building Node.js applications using Express & TypeScript, MySQL with Objection (ORM) and Knex. Start building REST APIs in seconds. ๐ŸŽ‰

License

Notifications You must be signed in to change notification settings

eliranlevi/node-ts-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

52 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Node-TypeScript boilerplate

Preconfigured boilerplate for building Node.js applications using Express & TypeScript, MySQL with Objection (ORM) and Knex.

Goal

Start building a Node.js server using SQL database and TypeScsipt in seconds ๐ŸŽ‰

Usage

Clone the repo, remove .git folder (rm -rf .git), install dependencies (yarn install) and you're ready to go (yarn start)

Scripts

  • yarn start - serves the app on localhost in watch mode
  • yarn run build - builds the project, the out directory is /dist
  • yarn db:migrate - updates the database with the latest migrations (an alias for knex migrate:latest),
  • yarn db:rb - rollbacks last migrations (an alias for knex migrate:rollback),
  • yarn db:mc migration_name - creates a new migration file named migration_name (an alias for knex migrate:make)

Packages ๐Ÿ“ฆ

  • TypeScript is here just to get modern ES6 features in Node, like import/export
  • request-promise-native - use Promises in Node requests
  • express - watch (and interact) whatever you expect in the browesr rather than CLI
  • nodemon - runs the server in watch mode (i.e. will rebuild each time the code has changed)

Database-related

Recommendations (best practices)

License

MIT

About

Preconfigured boilerplate for building Node.js applications using Express & TypeScript, MySQL with Objection (ORM) and Knex. Start building REST APIs in seconds. ๐ŸŽ‰

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published