https://github.com/link2twenty/express-sample-js
A sample express microservice using jsdoc for documentation.
https://github.com/link2twenty/express-sample-js
Last synced: about 1 year ago
JSON representation
A sample express microservice using jsdoc for documentation.
- Host: GitHub
- URL: https://github.com/link2twenty/express-sample-js
- Owner: Link2Twenty
- Created: 2025-03-30T16:41:38.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-30T17:03:01.000Z (about 1 year ago)
- Last Synced: 2025-03-30T17:33:35.723Z (about 1 year ago)
- Language: JavaScript
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## My Express Microservice
This is an example of how I (Link2Twenty) layout an Express microservice.
Documentation generated from JSDoc is available [here](https://link2twenty.github.io/express-sample-js/).
### Overview
This microservice provides a simple API for retrieving Astronomy Picture of the Day (APOD) entries from NASA, all API request are made from the server to [nasa's api](https://github.com/nasa/apod-api) before forwarding the data on.
This is only a sample project to show style, layout and documentation techniques and is not intended to be used in any form of production environment.
### Usage
```bash
# run server
node .
# generate docs
npm run jsdoc
# load env file and run server
node --env-file=.env .
```
#### Environment variables
To set environment variables you will either have to set them in the system environment (recommended for docker) or load in a seperate `.env` file.
```bash
PORT=NUMBER # port express is exposed on
API_KEY=STRING # NASA API_KEY
```