Skip to content

Latest commit

 

History

History
107 lines (70 loc) · 4.27 KB

README.md

File metadata and controls

107 lines (70 loc) · 4.27 KB

Online-Shop

GitHub GitHub issues Build Status Codacy Badge Conventional Commits Gitmoji

About

This project emerged from the requirements of a study project. During the implementation we tried to use current best practices of software development and to get to know new ones.

Prerequisites

Frontend

Docker Cloud Build Status Docker Image Size (tag)

🚀 Deploy

Use following commands to create a local frontend instance.

$ npm install

After installing all dependencies you can run it locally using

$ ng serve

Backend

🚀 Deploy

Use following commands to create a local Node.js backend server. The default port of the server is 3000. To configure the database connection and the port of the server, create a .env file.

cd backend
npm install
npm start

🙈 .env file

The .env file includes the database connection string, the Node.js server port and the JSON Web Token.
To create a .env file for the backend, use following commands:

cd backend
# Bash
echo DB_CONNECTION="{Connection String}"$'\n'PORT={Port}$'\n'JWT_KEY="{jwt token}" > .env
# PowerShell
echo DB_CONNECTION="{Connection String}" >> .env  & echo PORT={Port} >> .env & echo JWT_KEY="{jwt token}" >> .env

After that, open the .env file and replace {Connection String}, {Port} and {jwt token} accordingly.

🐳 Docker

Docker Cloud Build Status Docker Image Size (tag)

The backend image can be found here.

The docker version uses the same .env file as the normal version, expect the server port now is 8080.
Use following command to create a backend image und execute it:

docker-compose up -d --build backend

To stop and delete the docker container run following command:

docker-compose down

You can also create the image with the backend Dockerfile.

Database

Deploy

docker-compose up -d --build database

Built with 🛠️

Authors 👥

Copyright ©️

Copyright ©️ 2020 Florian Drinkler, Luca Stanger

License 📄

This project is licensed under the Apache License 2.0 - see the LICENSE.MD files for details