All Projects β†’ cham11ng β†’ typescript-api-starter

cham11ng / typescript-api-starter

Licence: MIT license
πŸ”° Starter for Node.js express API in Typescript πŸš€

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to typescript-api-starter

nestjs-objection
Objection module for NestJS
Stars: ✭ 24 (-66.67%)
Mutual labels:  knex, objectionjs, knexjs, objection
eslint-config-adjunct
A reasonable collection of plugins to use alongside your main esLint configuration
Stars: ✭ 39 (-45.83%)
Mutual labels:  eslint, prettier, chai
nest-boilerplate
Nest.js boilerplate with CircleCI, Commitizen, Commitlint, Docker-Compose, ESLint, GitHub Actions, Husky, Lint-staged, OpenAPI, Prettier, PostGreSQL, Travis CI, TypeORM
Stars: ✭ 16 (-77.78%)
Mutual labels:  eslint, prettier, github-actions
node-starter-kit
Node.js / GraphQL project template pre-configured with TypeScript, PostgreSQL, login flow, transactional emails, unit tests, CI/CD workflow.
Stars: ✭ 76 (+5.56%)
Mutual labels:  knex, seed, knexjs
react16-seed-with-apollo-graphql-scss-router4-ssr-tests-eslint-prettier-docker-webpack3-hot
Seed to create your own project using React with Apollo GraphQL client
Stars: ✭ 19 (-73.61%)
Mutual labels:  eslint, seed, prettier
objection-authorize
isomorphic, "magical" authorization integration with Objection.js πŸŽ‰
Stars: ✭ 71 (-1.39%)
Mutual labels:  objectionjs, knexjs, objection
BotBlock.org
BotBlock - The List of Discord Bot Lists and Services
Stars: ✭ 29 (-59.72%)
Mutual labels:  knex, chai, knexjs
awesome-address-book
This project shows a basic address book built with ReactJS, Redux Toolkit and Typescript πŸ“–
Stars: ✭ 20 (-72.22%)
Mutual labels:  eslint, prettier, github-actions
Vue Skeleton Mvp
VueJs, Vuetify, Vue Router and Vuex skeleton MVP written on JavaScript using async/await built to work with API REST skeleton: https://github.com/davellanedam/node-express-mongodb-jwt-rest-api-skeleton
Stars: ✭ 406 (+463.89%)
Mutual labels:  eslint, prettier, chai
React Starter Kit
React, Redux, Webpack, Material UI, Boostrap 4, Code Splitting, HMR
Stars: ✭ 229 (+218.06%)
Mutual labels:  eslint, prettier
Typescript Express Starter
πŸš€ TypeScript Express Starter
Stars: ✭ 238 (+230.56%)
Mutual labels:  eslint, prettier
graphql-example
GraphQL Sample Project
Stars: ✭ 32 (-55.56%)
Mutual labels:  objectionjs, knexjs
action-eslint-fix
GitHub Action to run `eslint` with `--fix` option and commit fixes
Stars: ✭ 20 (-72.22%)
Mutual labels:  eslint, github-actions
Eslint Config Wesbos
No-Sweatβ„’ Eslint and Prettier Setup - with or without VS Code
Stars: ✭ 2,293 (+3084.72%)
Mutual labels:  eslint, prettier
TypeScript-in-Nodejs-Starter
A starter kit for Node.js project written with TypeScript.
Stars: ✭ 39 (-45.83%)
Mutual labels:  winston, prettier
Poetic
Automatically install and maintain ESLint, Prettier, EditorConfig and Airbnb rules for JavaScript, TypeScript and React.
Stars: ✭ 165 (+129.17%)
Mutual labels:  eslint, prettier
Gatsby V2 Tutorial Starter
Gatsby V2 Starter - product of step by step tutorial
Stars: ✭ 139 (+93.06%)
Mutual labels:  eslint, prettier
express-objection-starter
an opinionated, production-ready, isomorphic express/knex/objection starter with centralized configuration
Stars: ✭ 19 (-73.61%)
Mutual labels:  knex, objection
fe-standard-config-seed
ε‰η«―ι€šη”¨δ»£η θ§„θŒƒθ‡ͺεŠ¨εŒ–ζŽ₯ε…₯
Stars: ✭ 18 (-75%)
Mutual labels:  seed, prettier
bradgarropy.com
🏠 my home on the web
Stars: ✭ 58 (-19.44%)
Mutual labels:  eslint, prettier

Typescript API Starter

Build Status

Starter for Node.js Express API in Typescript with jsonwebtoken, joi, Knex, Objection.js and many other popular tools.

Requirements

Getting Started

Clone the repository, install the dependencies.

$ git clone [email protected]:cham11ng/typescript-api-starter.git <application-name>

$ cd <application-name>

$ cp .env.example .env # Update database credentials

$ yarn migrate

Load fake data in database.

$ yarn load:fake <FactoryName> <Number>

Start the application.

$ yarn build # For production

$ yarn start # For development

Using Docker

Make a copy of .env.docker and save as .env.

$ cp .env.docker .env

Install dependencies and run the application locally.

$ docker compose up -d postgres

$ docker compose up -d api

$ docker compose exec api sh yarn migrate # Make sure server is started checking logs before running this command

View logs of the container.

$ docker compose logs -f

To stop the services.

$ docker compose stop api postgres

Generating Migrations and Seeds

To create migration use make:migration and seed use make:seeder:

$ yarn make:migration create_{table_name}_table

$ yarn make:seeder {table_name}_table_seeder

Example,

$ yarn make:migration create_posts_table

$ yarn make:seeder post_table_seeder

Modify migration and seeder file as per the requirement. Then finally:

$ yarn migrate # to migrate

$ yarn seed # to seed

Setting up REST Client

Create a file or add following lines in .vscode > settings.json and switch an environment Cmd/Ctrl + Shift + P > REST Client: Switch Environment. Then, you can request APIs from api.rest file.

{
  "rest-client.environmentVariables": {
    "$shared": {
      "refreshToken": "foo",
      "accessToken": "bar",
      "email": "[email protected]",
      "password": "secret" 
    },
    "local": {
      "host": "localhost",
      "refreshToken": "{{$shared refreshToken}}",
      "accessToken": "{{$shared accessToken}}",
      "email": "{{$shared email}}",
      "password": "{{$shared password}}"
    }
  }
}

Contributing

Feel free to send pull requests.

License

typescript-api-starter is under MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].