Runit is an environment for writing and executing code that will be actively used on all Hexlet Rus Ltd platforms. The closest counterpart is the repl.it service. The backend is developed in NestJS and TypeScript, the frontend uses React.
Tasks:
- Participation in service development
Features (current and future):
- Edit code online
- Share code via link
- Embed snippets in pages
- Collaborative editing
Tasks can be discussed in Telegram.
- node >= >=18.13.0
- Yarn 1 (Classic)
- PostgreSQL for use in production environments or SQLite for use in local development environments
make setup
make start
make test
make test-e2e
Structure of project's APIs is here.
To deploy to render.com do the following:
- Create a Postgres database. After preparing it, copy Internal Database URL.
- Create Web Service, select your fork.
- Name — it is better to use a prefix with your nickname. For example fey-runit.
- Region — any, you can use Frankfurt (EU Central) but make sure that Web Service and database are using the same region.
- Branch — from which the application will be deployed. You can use
main
for starters. In the future, use the branch in which you want to demonstrate the changes. - Root Directory — leave blank.
- Runtime — Node.
- Build Command —
make install build
. - Start Command —
make db-migrate start-prod
. - You can choose any plan, free is enough.
- Set environment variables. Click on Advanced and Add Environment Variable.
The following variables will be needed:
DATABASE_URL
— this is the URL you copied earlier — Internal Database URLNODE_ENV
—production
SECRET_KEY_JWT
— any string, you can generate a random string or insertsimpleDevKey
for simplicityTRANSPORT_MAILER_URL
— this should be the URL of the connection string of the mail sender. You can use the Mailtrap service for tests. An example url would besmtp://login:[email protected]:2525
.
Click on Create Web Service and watch the Deployment and Logs. If there are problems, ask questions here. Check first that there is no similar open topic.
To set up authorization with OAuth 2.0, you need to create and configure a GitHub App.
In your GitHub App settings, specify {appURL}/api/oauth
for Authorization callback URL, where {appURL} is the web address of your deploy.
Define the following environment variables for the deploy:
OAUTH_CLIENT_ID
Client ID from your GitHub App.OAUTH_CLIENT_SECRET
Generate a new Client secret in the GitHub App settings and specify it here.OAUTH_ACCESS_TOKEN_URL=https://github.com/login/oauth/access_token
OAUTH_AUTHORIZE_URL=https://github.com/login/oauth/authorize
GITHUB_USER_URL=https://api.github.com/user
Note. You may decide to use OAuth App instead of GitHub App. GitHub does not recommend this type of app, but it could be easier to set up for testing purposes.
Look at the list of issues, choose an interesting task, write to the issue to say you would like to work on the task.
This repository is created and maintained by the team and the community of Hexlet Rus Ltd, an educational project. Read more about Hexlet.
See most active contributors on hexlet-friends.