1.1 KiB
1.1 KiB
AutoCAD Server
A simple Node.js server to receive and store events from an AutoCAD plugin.
Features
- Receives object creation and modification events from AutoCAD
- Stores events in memory (with option to use MongoDB)
- Provides API endpoints to retrieve stored events
- Simple setup and configuration
Setup
- Clone this repository
- Install dependencies:
npm install - Configure environment variables in
.envfile (optional) - Start the server:
node server.js
Usage
The server provides the following endpoints:
POST /api/autocad-events: Endpoint for receiving events from AutoCADGET /api/autocad-events: Retrieve all stored events
AutoCAD Plugin Configuration
Update the ServerEndpoint variable in your AutoCAD plugin to point to this server:
private static readonly string ServerEndpoint = "http://localhost:3000/api/autocad-events";
Using with MongoDB (Optional)
To store events in MongoDB instead of memory:
- Uncomment the MongoDB connection code in
server.js - Set the
MONGODB_URIin the.envfile - Uncomment the MongoDB code in the controller
License
ISC