How to build this repo locally #20
e-t-k
announced in
Announcements
Replies: 1 comment
-
This is great! I also recommend these commands to check that everything is passing as it should before you commit. You can create an alias for them if you want in your shell of choice—I just store them in my shell history and rerun them there. # Check that all linting and formatting passes.
cd packages && cargo fmt && cargo test && cargo doc && cargo clippy -- -D warnings; cd ..
# Generate a new version of the spec, make sure it lints okay, then copy to
# pasteboard (on Mac) so that you can view it in editor.swagger.io.
#
# Note: you can also just run the server and visit the specification at
# http://localhost:8000/swagger-ui/ as Ellen points out above.
cd packages && cargo run generate -o ../swagger.yml -f && cd .. && spectral lint swagger.yml && cat swagger.yml | pbcopy If you want to run the latter command, you'll need to install Node ( |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
As a new Rust user I had to figure out the minimal steps to get this code running on my local machine (MacBook Air). I figure some of you may be in the same boat so I wanted to share my notes on the process. Any comments & suggestions are gratefully welcomed as I may be missing essential aspects.
Set up the repo
rustc
(compiler),rustup
(updater), andcargo
(package management).rustup toolchain install nightly
to installrustup default nightly
to usegit clone https://github.com/CBIIT/ccdi-federation-api.git
cd ccdi-federation-api/packages
. (This is the working directory for all following commands.)git checkout feat/restrict-charsets
Run the server locally
cargo run serve
. This will build all the dependencies (takes a minute the first time and is quicker thereafter) and then start a server on http://localhost:8000/ . When I ran it, I got a warning popup:I chose Deny and it seemed to work fine, since I'm connecting only from my local browser.
Make changes
cargo run generate > ../swagger.yml
. This will build your package and emit the YAML code.cargo run serve
as well as refresh the page in the browser.Beta Was this translation helpful? Give feedback.
All reactions