prolog-point-of-sale/main.pro

19 lines
537 B
Prolog

:- use_module(library(http/http_server)).
:- use_module(library(http/http_client)).
:- use_module(library(http/http_json)).
:- use_module(library(http/json_convert)).
:- use_module(library(http/json)).
:- use_module(library(persistency)).
:- initialization
http_server([port(8080)]).
:- initialization
absolute_file_name('database.db', File, [access(write)]),
db_attach(File, []).
:- json_object
product(name:atom, price:integer).
:- persistent
product(name:atom, price:integer).
:- consult('routes/products.pl').