Running database-table-maintenance on my PC

Alex Roytman has been nice enough to help me try to get this working. All my attempts end with “Cannot GET /app” . Yes connect4 and nodedesigner will run. I want to be sure the only dependencies are profoundjs and mysql? I did set up MariaDB and import the tables. I am wondering if this error is the result of not connecting to my database. how can I confirm the connections is being made? Any other suggestions?
config.js =
module.exports = {
“port”: 8088,
“staticFilesDirectory”: “htdocs”,
“pathlist”: [
“pjssamples”
],
“initialModules”: {
“/hello”: “pjssamples/hello”,
“/hello2”: “pjssamples/hello2”,
“/connect4”: “pjssamples/connect4”,
“/upload”: “pjssamples/upload”
},
// “dbDriver”: “IBMi”,
“dbDriver”: “mysql”,
“conectionDetails”: {
user: ‘mfuser’,
password: ‘mfuser’,
server: ‘localhost’,
database: ‘noderundatabase’
},
“timeout”: 3600,
“defaultMode”: “case-sensitive”
}

Hey David!

Kyle from Profound Logic support here.

When you install Profound.js it should set up a route for app in your server. This route looks for a module named ‘app.js’ in a directory called ‘app’ in your modules directory. Can you confirm that you have the ‘app.js’ module in the ‘app’ directory?

Thanks

Kyle thank you for your reply. I downloaded the Brian May version of database-table-maintenance.
after the npm install of profoundjs and mysql there is not an app.js in module/app

does the above show you my snip?

Should I have downloaded another version which has app.js?

additionally my download has an empty package.json which npm install profoundjs is really unhappy with. but I was able to fix that. Thank you for your help.

Hi David,

The name of the Node.js file doesn’t matter.

When Profound.js starts, it scans the modules directory for sub-directories that are NodeRun spaces. The way it knows that something is a NodeRun space is because it will have a .noderun directory within. I see that you have it.

In the .noderun directory,there is a settings.json file. When I tried what you’re doing, my file looked like this:

{
  "sequence": 80,
  "template name": "Database Table Maintenance",
  "description": "This is a full database maintenance CRUD application with view, change, add, and delete capabilities",
  "image": "/cloud/template-icons/database.png",
  "routes": {},
  "app start": "maintenance.js",
  "template dir": "database-table-maintenance",
  "current git repository": "",
  "git repositories": [
    ""
  ]
}

As you can see, it doesn’t matter if the Node.js file is a certain name, as along as it is specified as the app start file in settings.

What happens then is Profound.js creates a route named app, because that’s the name of the folder for the NodeRun space, and it ensures that the route is tied to your Node.js file (in this case maintenance.js).

So, with that, you should be able to navigate to http://localhost:8088/app to see your application.

I am not sure why it’s not working for you. I tried all the steps with Brian May’s Database Table Maintenance app and it works for me.

You mentioned an empty package.json file – it shouldn’t be empty. It should have at least this dependency when you first download.

"dependencies": {
    "profoundjs": ""
  }

After downloading, you should run npm install to install all the dependencies. This also downloads the Profound UI client-side framework and places it in the htdocs directory. I can see that you have this – so that’s good. Then, you will probably modify config.js to point to your MariaDB installation (which I see you’ve done). Those are all the steps that are normally needed.

Hi Alex,
I very much appreciate all these how things work explanations. They are going to be very useful to me.

I am pretty sure I know the reason I am having so much trouble. I have mentioned on a few occasions that files have no content when I open them in Visual Studio Code. An example was package.json.
But there are many others and it is due to something being wrong with the downloaded .zip file or something being wrong with 7-zip and or WinZip on my PC. So here are a few snips as examples.
Only one image per post for new users? :pensive:
WinZip
image

Blockquote

and I have to wait 12 seconds to add this? I love it.

7-zip (all header errors)

What tool is zipping these on your end? I am using chrome for these downloads should I try another browser. (well I will and see what happens and let you know.)
Anyway, if I have to I will cut and paste from noderun into my empty files. I will get it to work and then I can start learning it hopefully in the Visual Studio Code Debugger where I hope to do all my work.
So much fun :smile: Thank you.

Got all the files!! Used Edge for download and Win10 native file explorer for extraction.
npm install
npm install mysql
modified config.js with mysql (looks like this)
module.exports = {

    “port”: 8088,

    “staticFilesDirectory”: “htdocs”,

    “pathlist”: [

      “pjssamples”

    ],

    “initialModules”: {

      “/hello”: “pjssamples/hello”,

      “/hello2”: “pjssamples/hello2”,

      “/connect4”: “pjssamples/connect4”,

      “/upload”: “pjssamples/upload”

    },

    

    “dbDriver”: “mysql”,

    “conectionDetails”: {

      user: ‘mfuser’,

      password: ‘mfuser’,

      server: ‘localhost’,

      database: ‘noderundatabase’

    },

    “timeout”: 3600,

    “defaultMode”: “case-sensitive”

  }

  

and now I have (Drumroll please)


is this me or you?

Hi David,

It looks like you misspelled "connectionDetails".

Thanks,

Alex

Yes, poor typist. Working now and I am moving on to start my “actual” work. I feel a bit ashamed because you provide so much great documentation and I have only scratched the surface. I have a plan to move forward now and hopefully I can solve my own problems. I an not used to being a Jr Programmer again. Total novice. Sheesh. Thank you and everyone at ProfoundLogic.

Hey David,

I just wanted to let you know that we updated Noderun to correct the header errors when opening the zip file you download from the work space files tab when using 7zip or WinZip. So now when you download new zip files, you should be able to unzip them and set up the environment automatically using the instructions Alex provided earlier.

Thanks,

Kyle Law
Technical Support Specialist
Profound Logic Software

Kyle, was there actually something to adjust on your end? I just thought is was something with this laptop work gave me last week to replace the one that worked for me perfectly for 5.5 years?
Anyway, thanks for looking into that.

Hello David,

We adjusted the format of the zip files when they are created to play nicer with other unzipping programs.

Thanks,

Kyle Law
Technical Support Specialist
Profound Logic Software