Git Product home page Git Product logo

tarasmakarchuk / ek-blog_nestjs_graphql_postgres_redis_typescript_typeorm Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 345 KB

This project has been moved from the employer's private repository to gitlab. Blog on the nestjs+graphql with the ability to add articles, authorization, role guards

Procfile 0.05% TypeScript 94.42% Handlebars 0.92% HTML 0.72% JavaScript 2.95% CSS 0.93%
css graphql html nestjs pet-project postgresql redis typeorm typescript backend bull docker docker-compose

ek-blog_nestjs_graphql_postgres_redis_typescript_typeorm's Introduction

NestJS GraphQL TypeScript NPM Postgres Docker Redis Heroku WebStorm CSS3 HTML5 JavaScript Jest GitLab

The project "EK-Blog" enables authors to write, edit and publish their articles.


Part I To start the project to local:

1. Rename .env.dist file to .env
2. $ npm install
3. $ npm run migration:run
4. $ npm run start:dev

Part II To start the project using the docker container:

1. Rename .env.dist file to .env
2. in file .env uncomment section --Postgers Docker-- and comment --Postgers local--.
3. in docker-compose.yml change ports to 5433:5432.
4. $ npm install
5. $ docker-compose up
6. $ npm run migration:run
7. $ npm run start:dev or npm run start:prod

Part III To deploy the project on Heroku link

1. Create a new app on Heroku
2. In the project tab on Heroku "overview" install the add-on Heroku-Postgres
3. In the project tab on Heroku "overview" install the add-on Heroku-Redis
4. Create the Procfile in your project root directory and paste the following line into it: $ web: npm run start:prod
5. Follow the steps to deploy the project to Heroku in the "Deploy" tab
6. In the Heroku app go to the "settings" tab of the project,
click on the button "Reveal Config Vars"
add the following keys and values ​​to the fields:
DATABASE_URL: we take in the project on Heroku, tab resources, Heroku Postgres, settings, button View Credentials, copy the entire URI line
TYPEORM_CONNECTION: postgres
TYPEORM_URL: we take in the project on Heroku, tab resources, Heroku Postgres, settings, button View Credentials, copy the entire URI line
TYPEORM_PORT: 5432
JWT_SECRET: heroku
JWT_EXPIRES_IN: 1000d
TYPEORM_DRIVER_EXTRA: {"ssl":true}
NODE_TLS_REJECT_UNAUTHORIZED: 0
SMTP_HOST=smtp.gmail.com
SMTP_PORT=465
SMTP_SUPPORT_EMAIL=[email protected]
SMTP_SUPPORT_PASSWORD=generate a password following this instruction link
REDIS_HOST=ec2-52-211-224-65.eu-west-1.compute.amazonaws.com
REDIS_PORT=14510
REDIS_PASSWORD=we take in the project on Heroku, tab resources, Heroku Redis, settings, button View Credentials, copy the entire password line
REDIS_URL=we take in the project on Heroku, tab resources, Heroku Redis, settings, button View Credentials, copy the entire URI line

7. Add migrations to Postgres on Heroku:
$ npm run migration:run
8. Run the command $ git push heroku master

ek-blog_nestjs_graphql_postgres_redis_typescript_typeorm's People

Contributors

tarasmakarchuk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.