rarn
Version:
Universal Package Manager - Combining the best of Yarn and Conda for multi-language projects
64 lines (49 loc) • 1.36 kB
Markdown
# Simple RARN Example
This example demonstrates how to use RARN to manage both JavaScript and Python dependencies in a single project.
## Setup
1. First, make sure RARN is installed and built:
```bash
cd ../../
npm install
npm run build
npm link
```
2. Create an environment:
```bash
rarn env create simple-example --language javascript python
rarn env activate simple-example
```
3. Install dependencies:
```bash
rarn install
```
## Running the Example
### JavaScript Server
```bash
npm start
# or
node index.js
```
This starts an Express server on http://localhost:3000
### Python Script
```bash
npm run python
# or
python main.py
```
This runs a Python script that uses NumPy and makes a request to the Express server.
## What This Demonstrates
- **Multi-language dependencies**: Both npm (express, lodash) and Python (numpy, requests) packages
- **Environment management**: Creating isolated environments for projects
- **Unified package.json**: All dependencies in one place
- **Cross-language integration**: Python script calling JavaScript API
## Next Steps
Try adding more packages:
```bash
rarn add axios python:pandas python:matplotlib
```
Or create different environments for development and production:
```bash
rarn env create production --language javascript python
rarn env create development --language javascript python rust
```