I am back again with question related to GrampsJS now. I have a few of them.
The API is running well and am able to query it (it is hosted on Synology via Docker)
The config for the webapi:
TREE="MyFam" # set the name of your family tree
SECRET_KEY="..." # set your secret key
DISABLE_AUTH=True
# do not change the following lines as they refer to paths within the container
USER_DB_URI="sqlite:////app/users/users.sqlite"
MEDIA_BASE_DIR="/app/media"
SEARCH_INDEX_DIR="/app/indexdir"
STATIC_PATH="/app/static"
CORS_ORIGINS="*"
I have the CORS_ORIGIN set to * to allow access from all domains.
Following the steps:
- Clone the grampsjs repo
- Changed the API URLs in 3 files:
- const APIHOST = ‘http://192.168.1.135:5053’ in api.js
- ‘http://192.168.1.135:5053’: API_URL, in rollup.config.js
- fetchMock.get(‘http://192.168.1.135:5053/api/people/?profile=all’,… in grampsjs-view-people.test.js
- npm install
- npm run start
It opens up and the usual start is working fine. I get to select the language, home person and continue. Then the errors start creeping up.
:1 Access to fetch at 'http://192.168.1.135:5053/api/translations/en_GB?strings=[%22_Names%22,%22_Save%22,%22Abbreviation%22,%22About%22,%22Add%20an%20existing%20person%20as%20a%20child%20of%20the%20family%22,%22Add%22,%22Address%20Note%22,%22Addresses%22,%22After%22,%22Age%20at%20death%22,%22and%22,%22Archive%22,%22Association%20Note%22,%22Association%22,%22Associations%22,%22Attribute%20Note%22,%22Attributes%22,%22Author%22,%22Before%22,%22Birth%20Date%22,%22Birth%20Place%22,%22Birth%22,%22Borough%22,%22Building%22,%22Calculated%22,%22Call%20name%22,%22Cancel%22,%22Child%20Reference%20Note%22,%22Children%22,%22Citation%22,%22Citations%22,%22City%22,%22Clear%22,%22Collection%22,%22Complete%22,%22Con_fidence%22,%22Country%22,%22County%22,%22Custom%22,%22Dashboard%22,%22Database%20overview%22,%22Date%22,%22Death%20Date%22,%22Death%20Place%22,%22Death%22,%22Department%22,%22Description%22,%22Details%22,%22District%22,%22done%22,%22E-mail%22,%22Edit%20Citation%22,%22Edit%20Event%22,%22Edit%20Family%22,%22Edit%20Media%20Object%22,%22Edit%20Note%22,%22Edit%20Person%22,%22Edit%20Place%22,%22Edit%20Repository%22,%22Edit%20Source%22,%22Enclosed%20By%22,%22Error%22,%22Estimated%22,%22Event%20Note%22,%22Event%20Reference%20Note%22,%22Event%20Type%22,%22Event%22,%22Events%22,%22Families%22,%22Family%20Note%22,%22Family%20Tree%22,%22Family%22,%22Farm%22,%22Father%22,%22Female%22,%22File%22,%22Full%20Name%22,%22Gallery%22,%22Gender%22,%22General%22,%22Given%20name%22,%22Gramps%20ID%22,%22Hamlet%22,%22High%22,%22Home%20Page%22,%22Html%20code%22,%22in%22,%22Language%22,%22Last%20changed%22,%22LDS%20Note%22,%22Library%22,%22Loading%20items...%22,%22Locality%22,%22Low%22,%22Male%22,%22Map%22,%22Marriage%20Date%22,%22Married%22,%22Max%20Ancestor%20Generations%22,%22Max%20descendant%20Generations%22,%22Media%20Note%22,%22Media%20Object%22,%22Media%20Objects%22,%22Media%20Reference%20Note%22,%22Media%22,%22Military%20Service%22,%22Mother%22,%22Municipality%22,%22Name%20Note%22,%22Name%22,%22Neighborhood%22,%22New%20Citation%22,%22New%20Event%22,%22New%20Family%22,%22New%20Media%22,%22New%20Note%22,%22New%20Person%22,%22New%20Place%22,%22New%20Repository%22,%22New%20Source%22,%22Next%22,%22Nick%20name%22,%22Nickname%22,%22No%20items%22,%22Normal%22,%22Not%20found%22,%22Note%22,%22Notes%22,%22Number%20of%20citations%22,%22Number%20of%20events%22,%22Number%20of%20families%22,%22Number%20of%20generations:%22,%22Number%20of%20individuals%22,%22Number%20of%20media%22,%22Number%20of%20notes%22,%22Number%20of%20people%22,%22Number%20of%20places%22,%22Number%20of%20repositories%22,%22Number%20of%20sources%22,%22Number%20of%20tags%22,%22Number%22,%22Page%22,%22Parents%22,%22Parish%22,%22Participants%22,%22Partner%22,%22Password:%22,%22Path%22,%22People%22,%22Person%20Note%22,%22Person%22,%22Place%20Note%22,%22Place%22,%22Places%22,%22Prefix%22,%22Previous%22,%22Primary%22,%22Private%22,%22Province%22,%22Publication%20info%22,%22Quality%22,%22Range%22,%22References%22,%22Refresh%22,%22Region%22,%22Regular%22,%22Regular%22,%22Relationship%20to%20_Father:%22,%22Relationship%20to%20_Mother:%22,%22Relationship%20type:%22,%22Relationships%22,%22Repositories%22,%22Repository%20Note%22,%22Repository%20Reference%20Note%22,%22Repository%22,%22Research%22,%22Reset%22,%22Role%22,%22Second%20date%22,%22Select%20a%20file%22,%22Select%20a%20person%20as%20the%20father%22,%22Select%20a%20person%20as%20the%20mother%22,%22Select%20an%20existing%20media%20object%22,%22Select%20an%20existing%20note%22,%22Select%20an%20existing%20place%22,%22Select%20an%20existing%20source%22,%22Select...%22,%22Select%22,%22Selected%22,%22Set%20_Home%20Person%22,%22Share%20an%20existing%20event%22,%22Show%20Details%22,%22Siblings%22,%22Social%20Security%20Number%22,%22Source%20Note%22,%22Source%20Reference%20Note%22,%22Source%20text%22,%22Source:%20Author%22,%22Source:%20Title%22,%22Source%22,%22Sources%22,%22Span%22,%22Spouses%22,%22State%22,%22Statistics%22,%22Street%22,%22Suffix%22,%22Surname%22,%22Tag%22,%22Tags%22,%22Text%22,%22This%20field%20is%20mandatory%22,%22Timeline%22,%22Title%22,%22To%20Do%22,%22Town%22,%22Transcript%22,%22Type%22,%22Unknown%22,%22Username:%20%22,%22Value%22,%22Very%20High%22,%22Very%20Low%22,%22Village%22,%22Web%20Home%22,%22Zoom%22]' from origin 'http://192.168.1.107:8000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Need help fixing this error, because my plan is to setup GrampsJS on Synology itself and make it persistent. Then use reverse proxy and access it via a domain, so that my family/extended family can all contribute one day.
Also another request is a little help to be able to change the port number from the default 8000 to something else please.
I understand package.json usually can be used to change the port. Was hoping I can request this change.
Sorry @DavidMStraub , I know this is a lot… but at your convenience