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

Commit d857d9f

Browse files
Preparing for NodeJS Merge on master
Delete - modify and stuff.
1 parent 6bbf297 commit d857d9f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+485
-2614
lines changed

.dockerIgnore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.gitignore

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ instance/
99
.coverage
1010
htmlcov/
1111

12-
dist/
1312
build/
1413
*.egg-info/
1514

@@ -23,4 +22,10 @@ documents.db
2322

2423
# Databases
2524
codewe.db
26-
/git-mv-with-history.sh
25+
/scripts/git-mv-with-history.sh
26+
27+
node_modules/
28+
src/config/config.json
29+
src/key.pem
30+
src/cert.pem
31+
src/access.log

DockerFile

Lines changed: 0 additions & 13 deletions
This file was deleted.

README.md

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

3-
CodeWe is an open-source live code-sharing website developed in python with flask.
3+
[CodeWe](https://codewe.org/) is an open-source live code-sharing website developed in Javascript with [express](https://expressjs.com/) and [MongoDB](https://www.mongodb.com/).
4+
5+
![codeWe](https://github.com/allEyezOnCode/CodeWe/blob/master/imgs/ex.gif?raw=True "codeWe - exemple")
46

57
## Installation
68

79
### Classic installation
810

911
#### Requirements
1012

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

16-
The first step is to clone this repository, so open a terminal and run:
19+
Open a terminal and run:
1720

1821
```bash
1922
git clone https://github.com/allEyezOnCode/CodeWe.git
2023
```
2124

22-
Install project requirements and dependencies
25+
Next step is to install depedencies
2326

2427
```bash
2528
cd CodeWe
26-
pip install -Ur requirements.txt
27-
# or on debian
28-
pip3 install -Ur requirements.txt
29+
npm install
2930
```
3031

3132
#### Databases
3233

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.
48-
49-
#### Sqlite
34+
Codewe uses MongoDB to store the documents. So install it from the official [MongoDB](https://www.mongodb.com/) site
5035

51-
(skip this if you use mysql/MariaDB)
36+
### Configuration file
5237

53-
Simply execute
38+
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.
5439

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`
40+
## Running `CodeWe`
7041

7142
### With classic installation
7243

7344
To run the server, run a shell in the `CodeWe/src` folder and run:
7445

7546
```bash
76-
python main.py [ip [port]]
77-
# or on debian
78-
python3 main.py [ip [port]]
47+
node ./src/server.js
7948
```
8049

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

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

8661
## Licence
8762

docker-compose.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

src/api/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/api/api.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/config/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)