Solution Archive is an open source application that allows user to archive an important problems and their solutions.
Run the server on development mode then go to the link bellow
http://localhost:<port>/docs
$ docker build -t solchive .
$ docker run -it solchive
-
Install Node.js
-
install PostgreSQL
-
Install git
-
Clone the repository
$ git clone https://github.com/IslamGoher/Sol-Chive-psql.git
cd
to the repository directory
$ cd jogging-tracker
- Install dependencies
$ npm install
- Create
.env
file, and add Environment Variables to it usingnano
:
$ nano .env
- create database
npm run create-db-dev
- create database tables
npm run create-tables-dev
- Run the server
for development environment
$ npm run dev
for production environment
$ npm run build && npm start
-
PORT
= ${port number that server will running on}, example:3000
-
CLIENT_DOMAIN
= domain name that server will allow against CORS policy, example:*
-
CLIENT_HOME_URL
= URL to home page of front end server, example:http://localhost:5000/home
-
JWT_SECRET
= any string secret, example:my secret
-
PG_CLIENT_URI
= connection url to postgres server, to create database and tables, example:postgres://postgres:123456@localhost:5432/postgres
-
PG_POOL_URI
= connection url to postgres server, to connect with created database, example:postgres://postgres:123456@localhost:5432/solchive
-
PG_DB
= database name that wanted create, example:solchive
-
GOOGLE_CLIENT_ID
= the client id of google console application, example:********.apps.googleusercontent.com
-
GOOGLE_CLIENT_SECRET
= the secret of google console application, example:********
-
GOOGLE_REDIRECT_URI
= redirection url that login and signup the user, set to:http://localhost:<port>/api/v1/auth/google/callback
-
GOOGLE_GET_DATA_URL
= google api url to get user data, set to:https://www.googleapis.com/oauth2/v3/userinfo?access_token=
-
GOOGLE_GET_ACCESS_TOKEN_URL
= google api url to get access token, set to:https://www.googleapis.com/oauth2/v4/token