GithubHelp home page GithubHelp logo

mogilev-guide's Introduction

MogilevGuide

This project was generated using Nx.

Development server

Run npm run start:front for a dev server of frontend application. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.

Install firebase CLI to run server locally: npm install -g firebase-tools and then firebase use default

Run npm run start:api for a dev server of backend application. Navigate to http://localhost:5000/mogilev-guide/us-central1/api. Run npm run build:api:watch and the app will automatically reload build if you change any of the source files.

For example, http://localhost:5000/mogilev-guide/us-central1/api/api/interests navigates to interests controller of nodejs server.

To have permissions for firebase, you need api key, contact to Dzianis Pasiukou ([email protected]) or [email protected] for some details.

Build

Run npm run build:api to build api for this project. The build artifacts will be stored in the dist/ directory.

Run npm run build:front to build frontend for this project. The build artifacts will be stored in the dist/ directory. Use the npm run build:front:prod flag for a production build.

Running unit tests

Run npm run test to execute the unit tests via Jest.

Run npm run affected:test to execute the unit tests affected by a change.

Running end-to-end tests

Run npm run e2e to execute the end-to-end tests via Cypress.

Run npm run affected:e2e to execute the end-to-end tests affected by a change.

Understand your workspace

Run npm run dep-graph to see a diagram of the dependencies of your projects.

Further help

Visit the Nx Documentation to learn more.

For any assistance with this instruction contact Dzianis Pasiukou ([email protected]) or [email protected]

Google authorization

Run npm run start:api for a dev server of backend application. Navigate to http://localhost:5000/mogilev-guide/us-central1/api/login/google. The API will redirect you to google authorization page. After successful login in google it will redirect on http://localhost:5000/mogilev-guide/us-central1/api/api/interests with your token in cookies. If someone navigate to http://localhost:5000/mogilev-guide/us-central1/api/api/* without token into cookies he redirects to http://localhost:5000/mogilev-guide/us-central1/api/login/google for authorization.

For run (on localhost:5000) you need follows in environment variables:

1 - GOOGLE_APPLICATION_CREDENTIALS - path to mogilev-guide-dev-key.json;

2 - CLIENT_ID - client's id from cloud project;

3 - CLIENT_SECRET - client's secret from cloud project;

4 - REDIRECT_URL="http://localhost:5000/mogilev-guide/us-central1/api/login/google/callback" - for return after google login;

5 - REDIRECT_IF_FAIL_URL="http://localhost:5000/mogilev-guide/us-central1/api/login/google" - for redirect users without right cookies;

6 - GOOGLE_INFO_URL="https://www.googleapis.com/oauth2/v1/userinfo" - for get user information to check cookies;

7 - SUCCESS_LOGIN_URL="http://localhost:5000/mogilev-guide/us-central1/api/api/interests" - first endpoint after successful authorization;

mogilev-guide's People

Contributors

js-machine avatar averchenkoaa avatar dzianispasiukou1 avatar vostvesh avatar alexeimet avatar ytatarynovich avatar

Watchers

James Cloos 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.