Admin Overview - wbobeirne/nycda-ecommerce-server GitHub Wiki
There are a set of routes setup at /admin
that are used for configuring your products. These pages are listed below.
Every page behind /admin
is password protected. Trying to access a page without being authenticated will get you redirected here. This password is configured as your environment variable ADMIN_PASSWORD
. Entering the password once will save access until the next time the server restarts.
The main page of the admin, lists all of your products and links to edit them, add a new one, and import a JSON blob.
Add a new product. All fields required, except for category, rating, and specs.
The same template, but different routes, for editing an existing product.
The most complex admin page, used for bulk importing products. Expects an array of objects matching the following spec:
[{
"name": "Name of Product",
"price": "75.00", // No $ please!
"rating": 10, // Out of 10
"description": "A description as long as you'd like.",
"category": "category",
"specs": [{
"label": "Label",
"value": "Value"
}, /* ... */],
"originalImages": [
"http://domain.com/image.png",
/* ... */
]
}, /* ... */]
Note that the upload limits may cause some images to not get thumbnails. Don't worry, simply visit them and re-save their forms to attempt an upload later.