This is a custom Node.js server for integration between Shopify store and Billingo invoicing using webhooks.
- Node.js installed on your system.
- npm (Node Package Manager) installed on your system.
-
Clone the repository:
git clone <repository-url>
-
Navigate to the project directory:
cd grocery-scan-app-server
-
Install dependencies:
npm install
-
Make a copy of a
.env.example
file in the root directory and add your environment variables:copy .\.env.example .env
To start the Node.js server, run the following command:
node server.js
The base URL for all API requests is localhost:PORT
API requests must include a predefined Authorization header with a valid token.
- Key:
Authorization
- Value:
Bearer <API_TOKEN>
- Route:
/products
- Method: GET
- Description: Retrieves all products from the database.
- Route:
/product/:barcode
- Method: GET
- Description: Retrieves a product from the database based on its barcode with ingredients list.
- Parameters:
barcode
: The unique identifier of the product.
- 403 Unauthorized: Invalid token: Returned when the provided token in the Authorization header is invalid.
Continuous deployment is live to a DigitalOcean Droplet, and the app is auto-updating relative to changes to the main branch.
Made with ❤️ and JavaScript.