https://github.com/megapixel99/knock-off-reddit
For learning purposes only
https://github.com/megapixel99/knock-off-reddit
Last synced: over 1 year ago
JSON representation
For learning purposes only
- Host: GitHub
- URL: https://github.com/megapixel99/knock-off-reddit
- Owner: Megapixel99
- License: mit
- Created: 2021-03-01T02:33:39.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-05T16:33:48.000Z (over 5 years ago)
- Last Synced: 2025-02-04T21:41:22.960Z (over 1 year ago)
- Language: JavaScript
- Size: 65.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Knock Off Reddit
Basic Reddit clone featuring users and mostly functioning Sub Reddits.
For learning/teaching purposes only.
### Prepare the environment
In your Terminal or Command Prompt, run the following at the root of the project directory:
```
$ npm i --save
```
### Prepare the environment variables
1. Create a .env file, by renaming the provided sample
2. Add the required variables
### How to run the project using NodeJS
In your Terminal or Command Prompt, run the following at the root of the
project directory to run the server, which will expose the API:
```
$ npm start
```
### How to build the project using Docker
In your Terminal or Command Prompt, run the following at the root of the
project directory to run the server, which will expose the API:
```
$ docker build --tag not-reddit .
```
### How to run the project using Docker
In your Terminal or Command Prompt, run the following at the root of the
project directory to run the server, which will expose the API:
```
$ docker run -t -p 80:3000 --env-file ./.env not-reddit
```
### How to test the project using NodeJS
In your Terminal or Command Prompt, run the following at the root of the
project directory to run the tests:
```
$ npm test
```
### How to clean up the source code
In your Terminal or Command Prompt, run the following at the root of the
project directory:
```
$ npm i eslint --save-dev
```
then run (at the root of the
project directory):
```
$ ./node_modules/.bin/eslint . --fix
```