Skip to content

Using the API

Tamim Hamoudi edited this page Feb 7, 2024 · 2 revisions

Currently there is no stand-alone API. The idea from the website is to have a stylized API documentation.

To use the API, you can either run it locally or using Docker.

Docker 🐳

The project comes with a Dockerfile that you can build and run.

You can run the docker in multiple ways, the easits is to run the docker-compose.yml

Steps to run πŸƒβ€β™‚οΈ

  1. Clone the repo.
git clone https://github.com/thamudi/psychonauts-api.git
  1. cd into the project and run docker-compose up
  2. Thats it 😳

Locally πŸ πŸ§‘β€πŸ’»

Note: In order to serve the data from the api you will need to:

  1. Download my collection from here.

  2. Import the collection into your mongo db, check my import.sh script.

  3. Clone the repo.

git clone https://github.com/thamudi/psychonauts-api.git
  1. cd into the project and update the environmental variables file.
NUXT_PUBLIC_SITE_URL='http://localhost:3000' # used for specifying the domain for the API in the site.
MONGODB_URI='mongodb://localhost:27017/'' # Your mongo DB URL 
  1. Install decencies
yarn install
or 
npm install
  1. run the project
yarn dev
or
npm run dev
  1. Profit! πŸ‘Ύ
Clone this wiki locally