Skip to content

4vinn/cypher-code-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A real-time code editor made using React.js, Node.js, Express.js, Websocet.io


Deployed on Railway


Made 2 parallel railway services, one serving the frontend and the other serving the backend

Its frontend railway service - https://4vinn-cypher.up.railway.app/
Its backend railway service - https://4vinn-cypher-be.up.railway.app/


For that, I restructured my repo into a monorepo, that looks like this:

.
├── .gitignore
├── README
├── frontend/
│   ├── public
│   ├── src
│   ├── package.json
│   └── package-lock.json
└── backend/
    ├── server.js
    ├── actions.js
    ├── package.json
    └── package-lock.json

Created separate package.json for each backend and frontend, updated scipts/dependencies accordingly

Now, The package-lock.json file is used by npm to lock down the versions of dependencies to ensure consistent builds across different environments.
Regenerated the package-lock.json in each folder using install --package-lock-only.

npm install:

When you run npm install:

  1. It looks at your package.json file and installs the dependencies specified there.

  2. If there's a package-lock.json file, it uses it to ensure that the exact versions of the dependencies are installed.

  3. It creates or updates the node_modules folder in your project directory, which contains all the installed dependencies.

It also generates a package-lock.json file if one does not exist or updates it to reflect the current state of installed dependencies.

Made a railway service named "Cypher Code Editor - Frontend". Set the root dir to /frontend. Connected the github repo. Setuped the service variables. Generated a domain.

Made a railway service named "Cypher Code Editor - Backend". Set the root dir to /backend. Connected the github repo. Generated a domain.

On frontend service, set service variable to call the backend domain.


Other links:
_hidden_

About

A real-time collaborative code editor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors