Giter Site home page Giter Site logo

capstone.troth.mn's Introduction

Prerequisites

Please make sure that:
Node.js
MongoDB
Nginx
installed on your system. The current Long Term Support (LTS) release is an ideal starting point.

Installation

  1. Installing Node
sudo apt update
sudo apt install nodejs
sudo apt install npm
  1. Installing Nginx
sudo apt update
sudo apt install nginx
  1. Installing MongoDB
sudo apt update
sudo apt install -y mongodb
sudo systemctl status mongod

You’ll see this output:

Output
● mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: active (running) since Sat 2020-05-23 14:44:01 +08; 1 months 5 days ago
    Docs: https://docs.mongodb.org/manual
Main PID: 15287 (mongod)
CGroup: /system.slice/mongod.service
        └─15287 /usr/bin/mongod --config /etc/mongod.conf
  1. Download project files & installation
git clone https://github.com/troth-llc/capstone.troth.mn
cd capstone.troth.mn
npm install
cd client
npm install
  1. Configure environment file
cp .env.example .env

Environment example

JWTSECRET=@
PORT=8000
MONGO=mongodb://{username}:{password}@127.0.0.1:27017/troth?authSource=admin
GCLOUD_ID=(google cloud project id)

Example nginx configuration (/etc/nginx/sites-enabled/default)

server {
        server_name capstone.troth.mn;
        location / {
        proxy_pass http://10.140.0.4:8000;
        proxy_set_header Host $host;
        proxy_set_header   X-Forwarded-For $remote_addr;
    }
    listen [::]:443 ssl ipv6only=on;
    listen 443 ssl;
    ssl_certificate /etc/letsencrypt/live/capstone.troth.mn/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/capstone.troth.mn/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
}
server {
    if ($host = capstone.troth.mn) {
        return 301 https://$host$request_uri;
    }
    listen 80 ;
    listen [::]:80;
    server_name capstone.troth.mn;
    return 404;
}

Basic structure

This repository has the following structure:

├───client
│   ├───public
│   └───src
│       ├───assets
│       │   └───image
│       ├───component
│       │   ├───footer
│       │   ├───header
│       │   └───video
│       ├───container
│       │   ├───course
│       │   ├───home
│       │   └───submission
│       └───context
└───src
    ├───controllers
    ├───middleware
    ├───models
    └───routes

Google Services

Virtual Machine https://cloud.google.com/compute/docs/instances
Storage google-storage.json Google Bucket

Updated 2020-06-29

capstone.troth.mn's People

Contributors

tuguldur avatar

Watchers

 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.