Code Monkey home page Code Monkey logo

lks-apps-one's Introduction

LKS APPS 01

Desc : Deploy this apps to your aws. Create a scalable, available, reliable and secure infrastructure for this apps.


Client Config Setup

Create .env file in Client root folder

API_URL=YOUR_API_BACKEND_SERVER_HOST # For example http://localhost:8000
API_EXAM_URL=YOUR_API_BACKEND_SERVER_HOST # For example http://localhost:9000/exam

Running Client (Front End)

Client service has two options for deployment.

1st Option - Server Deployment

# Firstly You need to run this command to create .nuxt directory with everything inside ready to start
$ npm run build 

# Start your client apps in server-side production mode
$ npm run start 

2nd Option - Static Deployment (Pre-rendered)

Gives you the ability to host your web application on any static hosting, the static source code will be generated in dist folder

# Generate static source code
# Use --prefix <your_path> for specific path and use --quite or --slient for suppressing the output of npm
$ npm run generate

API Server Config Setup

Create .env file in Server root folder

NODE_ENV=production
PORT=8000
DB_TYPE=YOUR_DATABASE_TYPE
MYSQL_DB=YOUR_MYSQL_DATABASE_NAME
MYSQL_USERNAME=YOUR_MYSQL_USERNAME
MYSQL_PASSWORD=YOUR_MYSQL_PASSWORD
MYSQL_HOST=YOUR_MYSQL_HOST
MYSQL_PORT=YOUR_MYSQL_PORT
REDIS_HOST=YOUR_REDIS_HOST
REDIS_PORT=YOUR_REDIS_PORT
REDIS_PASSWORD=YOUR_REDIS_PASSWORD
AWS_ACCESS_KEY=YOUR_AWS_ACCESS_KEY
AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_ACCESS
AWS_BUCKET_NAME=YOUR_AWS_BUCKET_NAME
LOG_PATH=YOUR_LOG_FOLDER_LOCATION
CACHE_PATH=YOUR_CACHE_PATH_FILE_LOCATION_STORE

Running API Server (Private API)

# Start server on production mode
$ npm run start-prod 

# Stop server on production mode
$ npm run stop-prod 

Exam Service Config Setup

Create .env file in Server root folder

NODE_ENV=production #the options is dev, production, production-https
PORT=9000 # If not set, default port is 9000
DB_TYPE=mongodb_aws # The options mongodb or mongodb_aws, set mongodb_aws if your db at aws cloud
MONGO_DB=YOUR_MONGO_DATABASE_NAME
MONGO_USERNAME=YOUR_MONGO_USER
MONGO_PASSWORD=YOUR_MONGO_PASSWORD
MONGO_HOST=YOUR_MONGO_HOST
MONGO_PORT=YOUR_MONGO_PORT # Mongo port default is 27017
MONGO_CERT=YOUR_MONGO_CERT # The cert location is in ssl folder
LOG_PATH=YOUR_LOG_FOLDER_LOCATION
CACHE_PATH=YOUR_CACHE_PATH_FILE_LOCATION_STORE

Exam API Endpoint

API Endppint Description
GET "http://exam.example.com/exam" Entry API Endpoint.
GET "http://exam.example.com/exam/quiz" Quiz data API Endpoint.
GET "http://exam.example.com/exam/init" Create exam quiz dummy data.
GET "http://exam.example.com/exam/flush" Flush exam quiz dummy data.

Running Exam Service (Public API)

# Start Exam Service on production mode
$ npm run start-prod 

# Stop Exam Service on production mode
$ npm run stop-prod 

lks-apps-one's People

Contributors

betuah 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.