Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 3.28 KB

File metadata and controls

102 lines (68 loc) · 3.28 KB

Nebula API

A database for some really useful UTD data collected by our tools.

Project maintained by Nebula Labs.

Documentation

Documentation for the current production API can be found here.

How to use Nebula API in your own project

  • Visit our Discord and ask to be provisioned an API key (please provide details on your use case)
  • Read the documentation listed above (and authenticate with your key for interactive demos)
  • Make requests to https://api.utdnebula.com with your provisioned api key set as the x-api-key request header
  • Build cool stuff!

Contributing

Contributions are welcome!

This project uses the MIT License.

Please visit our Discord and talk to us if you'd like to contribute! Don't be afraid to ask for help!

How to Contribute

Create your own fork by forking this repository

Clone your forked repository. (Don't forget to install Git if you haven't already)

Submit proposed changes via a Pull Request

Repository Structure

  • rest/ - REST API service implementation
  • internal/ - Shared schemas, models, and utilities across services
  • Makefile & build.bat - Root-level build and development scripts

Building

Requirements

Building for Windows

Setup Go Dependencies with:

.\build.bat setup

Build with:

.\build.bat build

This will create an executable named rest-api.exe in the root directory.

Run with:

.\rest-api.exe

Note: Some users have experienced issues with Windows Defender or other antivirus blocking rest-api.exe from reading files, editing files, or causing slowed performance. Consider adding an exception to your nebula-api folder.

Building for macOS, Linux, and WSL

Setup Go dependencies with:

make setup

Build with:

make build

This will create an executable named rest-api in the root directory.

Note: If Make fails with "swag: No such file or directory" or similar, you may need to add GOPATH/bin to your path. On Mac/Linux, use echo 'export PATH=${PATH}:'$(go env GOPATH)'/bin' >> ~/.zshrc && source ~/.zshrc (or .bashrc) to add it permanently.

Run with:

./rest-api

Running API locally

Copy .env.template to .env with:

cp .env.template .env

Enter Nebula MongoDB URI in .env (ask for help in the Discord)

Run rest-api:

./rest-api

Check command output to see the route serving traffic. It's likely port 8080.

Visit http://localhost:8080 to access nebula-api locally.

Storage and email routes require additional environment variables. If you're working on these routes, ask for help in the Discord