Skip to content

nerovnia/pecode-simple-facebook-app

Repository files navigation

Simple facebook like application

API documentation

Please use:

  • Node.js: >=18
  • database: PostgreSQL, MySQL or MariaDB

Set start parameters

  • Create .env

Necessary

DATABASE_DBNAME=dbname
DATABASE_USER=myuser
DATABASE_PASSWORD=mypassword
JWT_SECRET=secret

Can use as default

DATABASE_TYPE=type (default 'postgres')
APP_PORT=port (default 3000)
DATABASE_HOST=host (default 'localhost')
DATABASE_PORT=port (default 5432)
JWT_EXP_TIME=time (default 15m')

Change default settings

src/config/app.default.config.ts

{
  main: {
    state: 'production',
    port: 3000,
    engine: 'express' | 'fastify',
  },
  auth: {
    jwtExpTime: '15m',
  },
  db: {
    host: 'localhost',
    port: 5432,
    user: 'postgres',
  },
};

Installation

$ pnpm install

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# build application
$ pnpm run build

# production mode
$ pnpm run start:prod

Database migrations

$ pnpm run typeorm:create-migration          # Create a migration
$ pnpm run typeorm:generate-migration        # Generate a migration
$ pnpm run typeorm:run-migrations            # Run a migration
$ pnpm run typeorm:revert-migration          # Revert a migration

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published