A real-time code editor with a file explorer functionality.
Follow these steps to set up Stockify locally:
- Fork and clone the repository:
git clone https://github.com/your-username/codesocket.git
- Install the required dependencies:
cd codesocket
cd client
npm install
cd server
npm install
- Set up the configuration file:
- Create an .env file in the client folder of the codesocket
- Update the necessary environment variables in the
.env
and.env.development
file.
client
.env.development
NEXT_PUBLIC_BACKEND_URL=http://localhost:8000
.env:
NEXT_PUBLIC_BACKEND_URL=<YOUR_HOSTED_BACKEND_URL>
server
.env
MONGODB_URI=<MONGODB_URI>
- Start the application:
For client: npm run dev
For server: npm run dev
- Access CodeSocket in your web browser at
http://localhost:3000
.
:3000
- Client application runs on this port.:8000
- Server and WebSocket services are hosted on this port.
- Build docker image
docker build -t codesocket-server .
- Run the Docker container
docker run -d -p 8000:8000 -p 6379:6379 codesocket-server
- Stop the docker container
docker stop <container_id>