121 lines
3.6 KiB
Markdown
121 lines
3.6 KiB
Markdown
|
# CliffbreakMeet 💬
|
||
|
|
||
|
This is the main Repository containing all required resources to run the server and a corresponding website.
|
||
|
`/server` contains the complete backend. Offering a REST API for all actions.
|
||
|
`/webapp` contains the Web App, communicating with the REST API from `/server`.
|
||
|
|
||
|
## Getting Started
|
||
|
|
||
|
The following instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
|
||
|
|
||
|
After setting up you local environment, you can access the following services with your web browser:
|
||
|
* Web frontend via [http://localhost:8080/](http://localhost:8080/)
|
||
|
* API documentation via [http://localhost:8080/api-docs/](http://localhost:8080/api-docs/)
|
||
|
|
||
|
### Prerequisites
|
||
|
|
||
|
`NodeJS (including NPM)` is required to run this project.
|
||
|
Also a working instance of MongoDB `mongod` is required to use all features.
|
||
|
You'll also need `git` if you want to contribute to the project.
|
||
|
|
||
|
|
||
|
### Installing
|
||
|
|
||
|
First clone this repository to your local machine by using
|
||
|
|
||
|
```
|
||
|
git clone https://git.cliffbreak.de/Cliffbreak/CliffbreakMeet.git
|
||
|
```
|
||
|
|
||
|
Change to the cloned repository and inside change your active directory to `server`
|
||
|
|
||
|
```
|
||
|
cd CliffbreakMeet && cd server
|
||
|
```
|
||
|
|
||
|
To install all required packages run
|
||
|
|
||
|
```
|
||
|
npm install
|
||
|
```
|
||
|
|
||
|
Copy the .env.example and paste it as .env
|
||
|
|
||
|
```
|
||
|
cp .env.example .env
|
||
|
```
|
||
|
|
||
|
To test the application run
|
||
|
```
|
||
|
npm test
|
||
|
```
|
||
|
|
||
|
To get the database running create a directory "mongo"
|
||
|
|
||
|
```
|
||
|
mkdir mongo
|
||
|
```
|
||
|
|
||
|
To start the mongo run
|
||
|
|
||
|
```
|
||
|
cd mongo && mongod --dbpath=.
|
||
|
```
|
||
|
|
||
|
To fill the database with dummy data
|
||
|
|
||
|
```
|
||
|
npm run seed
|
||
|
```
|
||
|
|
||
|
To start the server in development mode run the following npm script
|
||
|
|
||
|
```
|
||
|
npm run dev
|
||
|
```
|
||
|
|
||
|
## Configure Visual Studio Code
|
||
|
If you haven't a instance of Visual Studio Code up and running download the latest version [here](https://code.visualstudio.com/download).
|
||
|
Install the recommended extensions by opening the Extensions-Tab (Ctrl+Shift+X).
|
||
|
Enter `@recommended` and install all extensions.
|
||
|
After that restart Visual Studio Code to apply all changes.
|
||
|
|
||
|
## Contributing
|
||
|
First create an issue and assign it to yourself. Or assign an existing issue.
|
||
|
Make sure all issue details (description, labels, milestones) are correct.
|
||
|
Check out in a new branch. Notice our convention: use either feature or fix followed by a slash (`/`) and then a **short** description using camel case. (`fix/addMissingImports` or `feature/addBasicAuth`).
|
||
|
After that you may create a Pull Request to merge your changes into master (If it's work in progress add `WIP:` to the title!).
|
||
|
Also refer to our **[COMMIT_CONVENTION](COMMIT_CONVENTION.md)**
|
||
|
|
||
|
## Deployment
|
||
|
In this section you can read details on the deployment cycle.
|
||
|
|
||
|
### Changelog
|
||
|
After bumping the version in the `package.json` please run:
|
||
|
```
|
||
|
npm install
|
||
|
```
|
||
|
to update all packages and bump the application version.
|
||
|
|
||
|
After that generate a changelog via the `changelog` gulp script.
|
||
|
```
|
||
|
npm run changelog
|
||
|
```
|
||
|
Then commit and tag your changes using: (use this format for versioning: `v[major][minor][patch]` i.e. v1.2.3)
|
||
|
```
|
||
|
git commit -m 'bump: to {version}
|
||
|
git tag {version}
|
||
|
git push origin
|
||
|
git push origin --tags
|
||
|
```
|
||
|
|
||
|
## Built With
|
||
|
|
||
|
* [Node.js](https://nodejs.org/) - The JavaScript runtime used as the project's base
|
||
|
* [NestJS](https://docs.nestjs.com/) - The framework used to create the REST API
|
||
|
* [MongoDB](https://docs.mongodb.com/) - The database used to store and retrieve data
|
||
|
* [HandlebarsJS](https://handlebarsjs.com/) - Dynamic HTML renderer using templates
|
||
|
|
||
|
## Authors
|
||
|
|
||
|
* **Simon Giesel** - *Initial work* - [Simon Giesel](https://git.cliffbreak.de/SimGie)
|