Skip to content

NLW (Next Level Week) - Gamer Connection Platform (BackEnd). This project aims to connect gamers worldwide, facilitating the organization of online gaming sessions. The platform allows users to share their gaming preferences.

Notifications You must be signed in to change notification settings

Aleydon/eSports-backend

Repository files navigation

🌎 NodeJs Template 🌎

📌 Requirements: 📌

NodeJs: 🔗 https://nodejs.org/en/


▶️ Get Started:

  1. Clone this repo
git clone https://github.com/Aleydon/NodeJs-Template.git
  1. Install NPM packages
npm install or yarn install
  1. Run this project
npm run dev or yarn dev

Template configuration:


Relative Paths Config:

	"baseUrl": "./",
		"paths": {
			"@controllers/*": ["./src/controllers/*"],
			"@models/*": ["./src/models/*"],
			"@routes/*": ["./src/routes/*"],
			"@services/*": ["./src/services/*"],
			"@utils/*": ["./src/utils/*"],
			"@constants/*": ["./src/constants/*"],
			"@config/*": ["./src/config/*"]
		},

Tests:

  • How to run tests:
npm run test or npm run test:watch

It has an example of tests with Jest + Testing-Library in src/tests/example.spec.tsx

import { UserModel } from '@models/user.model';

const sum = (numberA: number, numberB: number) => {
	return numberA + numberB;
};

describe('User Model', () => {
	it('should check if the name passed in the User model is Aleydon', () => {
		const user = new UserModel('Aleydon', 29);
		expect(user.name).toBe('Aleydon');
	});
});

describe('Math', () => {
	it('should sum two numbers correctly', () => {
		const result = sum(1, 2);
		expect(result).toBe(3);
	});
});

Test Running:


Image test running

About

NLW (Next Level Week) - Gamer Connection Platform (BackEnd). This project aims to connect gamers worldwide, facilitating the organization of online gaming sessions. The platform allows users to share their gaming preferences.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published