An open API service indexing awesome lists of open source software.

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

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
```