A simple online code editor that allows users to write and execute JavaScript code directly in the browser.
This project demonstrates full-stack integration using React and Node.js, with clean API design and proper error handling.
- Write JavaScript code in browser
- Execute code using backend API
- Display output and runtime errors
- Clean and minimal UI
- Separate frontend and backend structure
Frontend:
- React
- JavaScript
- Fetch API
Backend:
- Node.js
- Express.js
- child_process
online-code-editor
- client (React frontend)
- server (Node.js backend)
- README.md
- Go to server folder
- Install dependencies
- Run server
Server runs on: http://localhost:5000
Health check: http://localhost:5000/health
- Go to client folder
- Install dependencies
- Start React app
Frontend runs on: http://localhost:3000
POST /api/execute
Request body:
- language: javascript
- code: JavaScript code as string
Response:
- output (string) on success
- error (string) on failure
- Only JavaScript supported
- No user authentication
- No persistent storage
- Execution time is limited
- Support multiple languages
- Add code editor library
- Improve UI/UX
- Add sandboxing for better security
Aditya Patil