Coder Social home page Coder Social logo

frunze-api's Introduction

Frunze API Server

Build Status License

Rust API server supporting Frunze Web IDE.

Development

Frunze API Server is API server written in Rust that relies on MongoDB database.

Database

To setup database please follow the instructions from Frunze repository.

Bill of Materials API

To estimate the price of your project, we should gather real-time offers for every project hardware component from the distributors (DigiKey, Mouser etc.) and we leverage Octopart for that. That means you should supply --bom-api-key xxxxxx command line argument with the proper Octopart API Key.

Schematic Export API

To locally deploy Schematic Export API please follow the instructions from Frunze repository.

Run Server

Run development API server with (localhost:8009 by default):

$ cargo run

or if you'd like to use custom IP address or/and port (don't forget to re-configure client part as well):

$ cargo run -- --ip 127.0.0.2 --port 8008

with Export API key:

$ RUST_LOG=frunze_api cargo run -- --bom-api-key xxxxxxxx

For custom MongoDB instance use the following parameters:

$ cargo run -- ... --db-ip 127.0.0.3 --db-port 27018 --db-name my-own-db-name

There is also option to run the API server in a dedicated Docker container if you just want to check it out:

$ docker build -t frunze-api:dev .
$ docker run -d --name frunze-api -p 8009:8009 frunze-api:dev

Build Server

Run cargo build. The build artifacts will be stored in the target/ directory. Use --release flag for a production build.

Run unit tests

Server part unit tests rely on stainless crate and hence require Rust Nightly (the server itself works fine with Rust Stable). It's recommended to use rustup to deal with several Rust versions simultaneously. Let's say you use rustup, then to run unit tests just run:

$ cargo +nightly test

Run Rust linter and source code formatter

To run Clippy checks:

$ cargo +nightly clippy

To format project with RustFmt:

$ cargo +nightly fmt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.