This is the BioDict API, which provides endpoints for managing bio articles, bio dictionary entries, and bio skincare items.
app engine deploy with cloud sql public connection, unix socket.
- Clone the repository
- Install dependencies
npm install - Create cloud sql DB with 'schema.sql' structure, use public connection, note the connection name (in the sql overview).
- Change SQL environment variable in app.yaml file with the following structures:
customize with your database
env_variables:
- DB_USER: 'your_db_username'
- DB_PASSWORD: 'your_db_password'
- DB_NAME: 'your_database_name'
- INSTANCE_UNIX_SOCKET: '/cloudsql/your-cloud-sql-connection name'- Change servers url inside
./config/swagger.jswith your base API URL, so later you can test the API with swagger - Deploy the application
gcloud app deploy - Attach Cloud SQL Client role to your app engine service account.
The API documentation is available at /api-docs when the server is running.
Endpoints
Bio Articles
GET /articles: Retrieve a list of articlesGET /articles/:id: Retrieve a single article by IDGET /articles?query=searchTerm: Retrieve articles by title or content containing the search term
Bio DictionaryGET /bio: Retrieve a list of biosGET /bio/:id: Retrieve a single bio by IDGET /bio?query=searchTerm: Retrieve bios by name or benefit containing the search term
Bio SkincareGET /biosk: Retrieve a list of skincare itemsGET /biosk/:id: Retrieve a single skincare item by IDGET /biosk?query=searchTerm: Retrieve skincare items by name or benefit containing the search term