Skip to content
This repository was archived by the owner on Mar 10, 2024. It is now read-only.

Commit 5ef7aab

Browse files
update readme
1 parent a6dcc3c commit 5ef7aab

File tree

1 file changed

+22
-49
lines changed

1 file changed

+22
-49
lines changed

README.md

Lines changed: 22 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,87 +1,60 @@
11
# CodeWe
22

3-
CodeWe is an open-source live code-sharing website developed in python with flask.
3+
CodeWe is an open-source live code-sharing website developed in Javascript with [express](https://expressjs.com/) and [MongoDB](https://www.mongodb.com/).
44

55
## Installation
66

77
### Classic installation
88

99
#### Requirements
1010

11-
* [python](https://www.python.org/downloads/) 3.7 or newer (this project is developed in python 3.8.3 and up)
12-
* pip
11+
* [Node.js](https://nodejs.org/en/download/) 14.15.1 or newer (this project is developed with the 14.15.1v)
1312
* [git](https://git-scm.com/downloads)
14-
* MySQL, MariaDB or sqlite (include in python standard library)
13+
* [MongoDB](https://www.mongodb.com/)
1514

16-
The first step is to clone this repository, so open a terminal and run:
15+
The first step is to clone this repository.
16+
17+
Open a terminal and run:
1718

1819
```bash
1920
git clone https://github.com/allEyezOnCode/CodeWe.git
2021
```
2122

22-
Install project requirements and dependencies
23+
Next step is to install depedencies
2324

2425
```bash
2526
cd CodeWe
26-
pip install -Ur requirements.txt
27-
# or on debian
28-
pip3 install -Ur requirements.txt
27+
npm install
2928
```
3029

3130
#### Databases
3231

33-
CodeWe runs by default with a mysql database, so you need to host one, but if you do not have such a database, fear not my friend! You can use Sqlite.
34-
35-
#### Mysql or MariaDB
36-
37-
Should you have a MySQL or MariaDB database server, execute the following in your sql shell to create the database.
38-
39-
```mysql
40-
mysql> source /src/db/sql_files/create_db.sql;
41-
```
42-
43-
Fill out (chage `[**redacted**]` to real passwords (do not share)) and then run `/src/db/sql_files/users.sql` in your sql shell to create the users.
44-
45-
The last step is to modify the /src/config/db_config.dist.py, with your credentials
46-
47-
Using `cp /src/config/db_config.dist.py /src/config/db_config.py`, copy the database configuration file and fill it with the info needed.
32+
Codewe uses MongoDB to store the documents. So install it from the official [MongoDB](https://www.mongodb.com/) site
4833

49-
#### Sqlite
34+
### Configuration file
5035

51-
(skip this if you use mysql/MariaDB)
36+
Before running the project you need to create the configuration file `config/config.json` from the `config/config dist.json` with your informations, like the host, the port, your database credentials, etc.
5237

53-
Simply execute
54-
55-
```shell
56-
python[3] /src/db/create_sqlite_db.py
57-
```
58-
59-
and change `DB_TYPE` to `"sqlite"` in `/src/config/config.py`.
60-
61-
### Build with docker *(instable)*
62-
63-
```bash
64-
sudo docker-compose up -d --no-deps --build
65-
```
66-
67-
Help wanted configuring it correctly!
68-
69-
## Rununing `CodeWe`
38+
## Running `CodeWe`
7039

7140
### With classic installation
7241

7342
To run the server, run a shell in the `CodeWe/src` folder and run:
7443

7544
```bash
76-
python main.py [ip [port]]
77-
# or on debian
78-
python3 main.py [ip [port]]
45+
node ./src/server.js
7946
```
8047

81-
## Plan vor V2
48+
## Next features
49+
50+
* Document with privileges (anon auth, and jwt usage)
51+
* New programming langages
52+
* More options
53+
* Server montioring with prometheus and grafana
54+
55+
## Contribution
8256

83-
* Migration to Nodejs (instead of flask)
84-
* Store document as json or an array in Database
57+
Feel free to contribute, open an issue, then fork the repo and submit a PR.
8558

8659
## Licence
8760

0 commit comments

Comments
 (0)