planta-feliz / ExpoPortfolio

🪐🌌 Plataforma para expor seu portfólio facilmente✨
MIT License
1 stars 3 forks source link

feat!: Criação de servidor #9

Closed nunniii closed 1 year ago

nunniii commented 1 year ago

Descrição da Solicitação de Pull Request

Criação de servidor back-end

Tipos de Alterações

Testes Realizados

Informações Adicionais

Achei relevante adotar arquitetura baseada em MVC, o que priorizeis nestes commits docs.nestjs/mvc

Dependências de pacotes:

[...]
"dependencies": {
    "@fastify/static": "^6.11.2",
    "@fastify/view": "^8.2.0",
    "@nestjs/common": "^10.0.0",
    "@nestjs/core": "^10.0.0",
    "@nestjs/platform-express": "^10.0.0",
    "@nestjs/platform-fastify": "^10.2.6",
    "handlebars": "^4.7.8",
    "hbs": "^4.2.0",
    "reflect-metadata": "^0.1.13",
    "rxjs": "^7.8.1"
  },
  "devDependencies": {
    "@nestjs/cli": "^10.0.0",
    "@nestjs/schematics": "^10.0.0",
    "@nestjs/testing": "^10.0.0",
    "@types/babel__core": "^7.20.2",
    "@types/express": "^4.17.17",
    "@types/jest": "^29.5.2",
    "@types/node": "^20.3.1",
    "@types/supertest": "^2.0.12",
    "@typescript-eslint/eslint-plugin": "^6.0.0",
    "@typescript-eslint/parser": "^6.0.0",
    "eslint": "^8.42.0",
    "eslint-config-prettier": "^9.0.0",
    "eslint-plugin-prettier": "^5.0.0",
    "jest": "^29.5.0",
    "prettier": "^3.0.0",
    "source-map-support": "^0.5.21",
    "supertest": "^6.3.3",
    "ts-jest": "^29.1.0",
    "ts-loader": "^9.4.3",
    "ts-node": "^10.9.1",
    "tsconfig-paths": "^4.2.0",
    "typescript": "^5.1.3"
  },
[...]

Servidor inicia na porta 3000: const PORT = 3000;; await app.listen(PORT); // init

**script start:dev inicializa aplicação: "start:dev": "nest start --watch",

basta rodar: npm i ; npm run start:dev