Skip to content

eblind39/vcpback-end

Repository files navigation

Welcome to the Video Creator Platform API

Nest Logo TypeORM Logo Typescript Logo Postgres Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Docker setup

# Download the official postgres docker image and run a container
$ docker run --name vcpdb-pg -p 5432:5432 -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=vcpdb -d postgres

Database credentials

host: localhost

port: 5432

database: vcpdb

user: postgres

password: postgres

Install NPM dependencies

$ npm install

Running the app

# watch mode
$ npm run start:dev

NOTE: TypeOrm is set with the flag synchronize=true, which enables the creation of the tables with the execution of the above command..

The API service runs in the port 3007.

Seeders

# Initial data for Role, User and Videos
$ npm run seed

Swagger

Go to http://localhost:3007/api to watch the endpoints and play around with them.

NOTE: The only way I discovered to ensure the API consumption via Cookie authentication was to get directly the generated cookie by the endpoint: /authentication/signin, it comes within the Response Headers and you must set the cookie in the browser (Javascript console):

document.cookie = 'Authentication=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOjMsInJvbGVOYW1lIjoiU3R1ZGVudCIsImlhdCI6MTY1ODMzOTY2NiwiZXhwIjoxNjU4MzQzMjY2fQ.tIqAxRRiFTsV25dyvZdNhM38YL3T0eOYEQ1rECDhM2w; Max-Age=3600s'

You can use any of the user registered by the seeds, for example:

Username: clementine@yesenia.net

Password 12345

Every user's password is the same: 12345

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

Videos Creator Platform - nestjs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages