Skip to content

TemaGolovin/runit

 
 

Repository files navigation

Runit

On Push

About

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.

System requirements

  • node >= 18
  • Yarn 1 (Classic)
  • PostgreSQL for use in production environments or SQLite for use in local development environments

Installation

make setup

Running the app

make start

http://localhost:3000

Run tests

unit tests

make test

e2e tests

make test-e2e

API Documentation

Structure of project's APIs is here.

Deploy to render.com

To deploy to render.com do the following:

  1. Create a Postgres database. After preparing it, copy Internal Database URL.
  2. Create Web Service, select your fork.
  3. Name — it is better to use a prefix with your nickname. For example fey-runit.
  4. Region — any, you can use Frankfurt (EU Central).
  5. 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.
  6. Root Directory — leave blank.
  7. Runtime — Node.
  8. Build Command — make install build.
  9. Start Command — make db-migrate start-prod.
  10. You can choose any plan, free is enough.
  11. 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 URL
  • NODE_ENVproduction
  • SECRET_KEY_JWT — any string, you can generate a random string or insert simpleDevKey for simplicity
  • TRANSPORT_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 be smtp://login:password@sandbox.smtp.mailtrap.io: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.

How you can help the project

Look at the list of issues, choose an interesting task, write to the issue to say you would like to work on the task.


Hexlet Rus Ltd logo

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.

About

Online Editor Form Embedding

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.4%
  • TypeScript 34.2%
  • CSS 6.0%
  • Makefile 0.5%
  • Pug 0.5%
  • HTML 0.2%
  • Other 0.2%