How do I check the remix logs of my Glitch project?

Gave up and am just using the Glitch API at this point. I remembered the remix chains are in there… I haven’t set it up to show properly on a webpage yet but I know how to. I’ve updated my last link (node-basic-auth-remix)

could you try making a small page for remix logs, and make it able to be remixable and usable by changing a link inside of the code? or does it have to be on the project I want to log?

I’m not sure what you mean - you’d be able to remix it no matter what if it’s public. You have to change the domain in the link on line 37 of the server.js file to the site you want to look at to see its remix chain. I have it set to the app I’m currently working on but it could point to someone else’s app.

edit: actually I think I understand - yes, what you’re saying is possible. if there’s an input on the front for someone to enter the site domain name they want.

Your remix log for vhe is right here - https://api.glitch.com/v1/projects/by/domain?domain=vhe

And then to convert those IDs to project names…
https://api.glitch.com/v1/projects/by/id?id=5acf512a-88cf-49e7-96a7-97106fa47ba2

1 Like

I am hoping I can get this going more easily by fetching right from the API but so far it’s not quite doing what I want. I’m about to pull it all into a regular HTML site though because the API is open anyway.

1 Like

hey @RiversideRocks - any idea why the second function here might not be working? I’m hoping I can get it to search. https://iodized-mellow-year.glitch.me/

1 Like

data.domain isn’t defined. The Glitch API puts JSON responses like this (for the domain “test”):

{
  "test": {
    "private": false,
    "id": "5886c2cb-c97d-464c-a825-62bb472e99c0",
    "description": "A quaint project that does moral things",
    "domain": "test",
    "baseId": "b51ca96c-39eb-4c2d-929a-3848920ae2f1",
    "gitRepoUrl": null,

and so on..

What you would instead want to do is print data.project.domain. From your code it looks you have the domain set to item, so:

if (item.trim()) {
            fetch(`https://api.glitch.com/v1/projects/by/domain?domain=${item}`)
              .then(res => res.json())
              .then(data => {
                console.log(data)
                if (data === null) {
                  resultText.textContent =
                    'There are no search results. Try again!'
                } else {
                  //data.map(data =>
                  log.insertAdjacentHTML(
                    'afterbegin',
                    `<p>${data.item.domain.remixChain}</p>`
                  )
                }
              })
            search.value = ''
          } else {
            resultText.textContent = 'You must search for something.'
          }
1 Like

I tried that, and keep getting undefined. I initially had it set to ‘domain’ and later switched it to ‘item.’

I think it doesn’t like using that /projects/by/domain?domain=something in search. There’s a different (shorter) endpoint for searching built into the API but it throws a database error. I’ve gotten the sense the API is still being worked on?

I added you as a collaborator to the project if you want to poke around in there. You seem to know it well.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.