Coderplex web application comprises of two repositories :
-
OpenRank-Frontend : Frontend of the application
-
OpenRank-Backend : Backend of the application, where API calls are made.
-
OpenRank-Execution : Backend of the application, where code execution and server-side testing happens.
Coderplex has adopted Contributor Covenant that we expect project participants to adhere to.
All work related to the application takes place on Github itself. We use Issues to track bugs, discuss ideas and to engage open source contributors. Projects are used to keep track of everything and is our project management tool. We maintain Wiki for structuring our long term thoughts. Both core team members and contributors sends a pull request which goes through the same review process. Whole process is as transparent as it can be and we strive to keep it that way.
The master
branch of coderplex is relatively stable branch which we update for every release. We also have auto deployment in place for that particular branch i.e any changes in that branch gets reflected in https://openrank.coderplex.org. It is highly recommended for both maintainers and contributors to raise a pull request to develop
branch. Before every release we throughly test develop branch and merge into master.
A pull request to any other branch may most likely be closed by our bots.
We welcome pull requests from beginners and seasoned javaScript developers alike!
- Find an issue that needs assistance by searching for the open issues.
- If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don’t accidentally duplicate your effort.
- If somebody claims an issue but doesn’t follow up for more than a weeks, it’s fine to take over it but you should still leave a comment.
- Open a new issue if you would like report a bug or suggest improvements.
- Please wait for core team members to comment on the thread. This lets us reach an agreement on your proposal before you put significant effort into it.
-
- Minimum version v8.0.0+
# To check node version node -v
Any lower version than mentioned above may results in this error.
If you face problem updating your node then you might need a Node version manager tool. Follow here
-
Git (Familiarity with git is mandatory).
Working on your first Pull Request? You can learn how from this free series How to Contribute to an Open Source Project on GitHub
- Fork the repository.
- Then clone your forked repository
git clone <your forked repository url>
- Move to the repository root folder
cd openrank-backend
- Install dependencies
npm install
- Create a
.env
file and values from.env.example
. Change the values according to the environment that you're using to run the project. Make sure that you have database server running at port that you specified in the.env
file.Note: You need to create a database manually because sequelize doesn't support creation of users and databases.
- Migrate the models to database.
npm run migrate
- Start the development server
App now opens at
//for development server using nodemon npm run start:dev //for running server using node npm run start
localhost:8000
in your default browser. If it doesn't, once you see a message on console saying the development server is hosted at above mentioned address. Please visit localhost:8000 in the browser of your choice.You may get this error if any other app is already running the above port.
- From your fork, create a branch and name it. eg.
typo-in-readme
orissue-9-fix
orissue-12-feature-addition
- If you’ve fixed a bug or added code that should be tested, add tests!
- Ensure that all test pass
npm run test
- Run code formatters
npm run lint
- Add and commit your code. Please give meaning full commit messages.
This project follows the all-contributors specification. Contributions of any kind welcome!
To add yourself to the table of contributors on the README.md
, please use the automated script as part of your PR:
yarn run add-contributor
Follow the prompt and commit .all-contributorsrc
and README.md
in the PR.
- Pull latest code from upstream repository's
develop
, if in case anything new were merged while you were working on your fork. - Push the code to your fork.
- Raise the pull request from your created branch to
develop
branch of coderplex. why develop instead of master branch? - Take some time to give a brief description of the work you have done.
-
Wait for all checks to pass in below section.
-
Your changes are deployed with a unique link
https://deploy-preview-xx--coderplex.netlify.com
.- xx
is your pull request number. -
The core team will review your pull request and either merge it, request changes to it, or close it with an explanation.
- Work on the requested changes
- Push the changes as you did earlier, the pull request will automatically catch those and update itself.
- OpenRank Discord Channel
nvm for Linux & macOS
# Installation
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
# Install latest node lts
nvm install --lts
# Use installed version
nvm use --lts
# Run the app in the same terminal session
Make sure you have curl installed
nvm-windows for Windows
It comes with an installer.
# Install particular version
nvm install 8.9.1
# Use installed version
nvm use 8.9.1
Still facing problem this article from @skounis explain in details.
Error: listen EADDRINUSE :::8000
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1351:14)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1476:7)
at app.prepare.then (/home/m-zubairahmed/github/official/openrank-backend/server.js:26:6)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
error Command failed with exit code 1.
If you get this error while running rpm run start:dev
then probably another app is occupying localhost:8000
. You may want to close that and run the command again.