Nodejs Backend Architecture Typescript Versions Save

Node.js Backend Architecture Typescript - Learn to build a backend server for production ready blogging platform like Medium and FreeCodeCamp. Main Features: Role based, Express.js, Mongoose, Redis, Mongodb, Joi, Docker, JWT, Unit Tests, Integration Tests.

2.0.3

4 months ago

2.0.1

1 year ago

In general APIs with v1 in the routes directory is not a good way to handle versioning. This has been removed from the project. Now {host}/v1/login will become {host}/login

2.0.0

1 year ago

This is major update to the project and not compatible with the version 1.x.x

Major Changes

  1. Redis Cache Implementation
  2. Upgraded to Mongoose 6.8.0
  3. static class member replace with module default exports
  4. All libraries are updated to latest version
  5. Change in project structure
  6. Addition of API endpoint permission system
  7. vscode task to generate template for route, models, and repository

1.0.2

4 years ago
  1. The headers for the protected APIs has been migrated to the standard Authorization header with the Bearer scheme.
  2. x-user-id header has been removed.

Earlier:

GET /v1/profile/my
 
// Headers
x-api-key: GCMUDiuY5a7WvyUNt9n3QztToSHzK7Uj
Content-Type: application/json
x-access-token: <your_token_received_from_signup_or_login>
x-user-id: <your_user_id>

Now:

GET /v1/profile/my 
 
// Headers
x-api-key: GCMUDiuY5a7WvyUNt9n3QztToSHzK7Uj
Content-Type: application/json
Authorization: Bearer <your_token_received_from_signup_or_login>

1.0.1

4 years ago

The naming convention has been changed for all the interfaces:

Earlier:

export interface IUser extends Document {
        name: string;
        ...
}

const User = model<IUser>(DOCUMENT_NAME, schema, COLLECTION_NAME);
export default User;

Now: IUserUser and UserUserModel

export default interface User extends Document {
        name: string;
        ...
}

export const UserModel = model<User>(DOCUMENT_NAME, schema, COLLECTION_NAME);

Similar changes for IApiKey, IRole, IKeystore, and IBlog

1.0.0

4 years ago