Locomotive wagon does not display data in local development site - locomotivecms

I have an existing locomotive site that I am setting up for development on my machine. The engine is running locally and I am using the wagon gem to edit the theme files.
The engine seems to be fine, although a little slow.
What I am having trouble with is the wagon side of things.
I have set up the deploy.yml to point to my local engine and run wagon pull development this started fine but timed out before it could pull everything. So instead I ran wagon pull staging to pull from the existing staging server and this ran fine.
When I run wagon serve I get the template files showing correctly but none of the content from the data yaml files is shown.
Am I missing something or is it an issue created by first pulling from development then staging?

Turns out someone else working on the project had extended liquid inside the engine to add a couple of extra things. These things were needed to show the content, but as the wagon gem didn't contain these extensions it couldn't use them to show the content.
The fix was to just use wagon to push to a local engine to view the changes.

Related

Shopware 6 - How to debugging js file in adminstation

Right bow, after changing JS files, i must run the command ./bin/build-administration.sh administration:dev to update js file on browser.
I am looking for a mode, where JS files will update directly after I reload the browser and don't need to run the command.
If you're using the Development template you can use ./psh.phar administration:watch to start the administration watch mode with hot-reloading. So your browser will automatically refresh the site after you made some changes to your administration files.
You can also get a full list of commands with./psh.phar.
If you're using the production template - which i don't recommend for local plugin development - you can use bin/watch-administration.sh. Those commmands are described within the README of the production template repository.
Only after you finished all your work, you have to build the files for the production environment.
Take a look at this article to learn the difference between the production and development template: https://www.p16r.nl/2020-08-28-shopware-6-development-versus-production-template/

Node server routes all timing out

No idea what happened... It was working and then it wasnt.
I am currently building a web app and decided to take some time off from the product side and build a landing page.
For some reason, I decided to build the landing page on a separate Github branch. So I checked out to a new branch, deleted everything, and started working on the landing page.
I soon realized this is a terrible idea and created a new repo to store my landing page.
I checked back into my master branch and spun my Node server up but for some reason now, everything is timing out. I opened Postman and tried hitting some of my endpoints but after like 3 minutes of loading, it tells me that it could not get any response and that there was an error connecting to localhost:3001/api/posts
In my terminal, all I see is this when I hit the route:
GET /api/posts - - ms - -
This has never happened to me before and I am completely clueless on WTH happened.
I tried deleting my local stuff and re-cloning the repo and installing my dependencies but to no avail...
Would love to know if someone has an idea on what's going on.
Check first is this isn't because of another process already listening on that port (but using resources which were deleted or not properly updated)
Closing applications or even rebooting can help you asserting if the issue is permanent or just linked to your current session.
The OP Syn points out in the comments the ~/.env file missing
.env files allow you to put your environment variables inside a file.
You just create a new file called .env in your project and slap your variables in there on different lines.
To read these values, there are a couple of options, but the easiest is to use the dotenv package from npm.
npm install dotenv --save
Note: it is generally not versioned, as it includes potentially sensitive date.

How do i setup my code for production vs local in node.js?

So technically I have finished coded my web app, and I want to deploy it to production.
How do I separate between codes in production in local?
For example in local there are many codes that are depending on 'http://localhost:3000' vs production 'http://www.example.com'. Even in facebook I have keep changing the URL name back and forth, because Sometimes I want to test it on local Dev.
and same goes to mongodb as well, for local i will use local version, for production I have to switch it again. It is really redundant.
use config files for example this one is good.
https://www.npmjs.com/package/config

Unable to publish node js site to azure using Visual Studio 2013

I am publishing my node js site to azure using this tutorial - http://blogs.technet.com/b/sams_blog/archive/2014/11/14/azure-websites-deploy-node-js-website-using-visual-studio.aspx
I get the following error, as mentioned in one of the comments on the blog, any idea what this error is about and how do I fix this ? I am able to run my app locally no issues with that.
Error: InvalidParameter
Parameter name: index
P.s : the site is like a very basic "Hello world" kind of site, this is the first time I am using and deploying to azure too.
I created a new project as a "Blank Azure Node.js web application", and replaced the resulting package.json and .js files with what I had before, and it publishes fine now
All was working fine for and suddenly got the error! I pretty sure it something in the project as it's now happening on vs2013 and vs2015 on different computers.
Its something to do with Templates after a lot of searching. For me Azure TFS CI got things working again if possible for you?
I had this issue with some projects but not with others, all created in a similar way. So I went thought every change and every setting I could until eventually i worked it out. I didn't want to give up and just remake them.
Basically its file paths, the first thing you notice is that it errors very quickly compared to a usual publish, the first thing that is triggered is a build but unlike heavy framework languages there not really much to actually build.
Like all builds for VS it pops out a bin folder take not of where this appears. This is the key, you want this to appear in the root of your deployment usually at the same level as the publish profile.
Before I moved my projects to VS, TFS and Azure, I used to use git and used the azure push and deployment as part of git, so I instinctively structured my folders in the similar fashion with src folder and all the extra VS baggage in the a directory higher.
This is where I noticed bin folder, so re-structured my solution and made changes to .njsproj (notepad) and moved to be inline with source code and re-added it yo my solution.
Technically speaking this a bug within VS as it allows to create the project and specify different locations which is all fine unless you want to build and publish locally.
Once you get your head around what is going on you should be able to solve this problem easily and not make the same mistake in the future. If anyone is still confused comment and ill grab some screen shots.

cakePHP, what to do next?

I've followed some tutorials about cakePHP and now it's done, the "mvc" is ready.
What should I do next?
Meaning: I was working locally, can I simply upload the complete app online and it is secured as 'they' meant it to be?
I've downloaded the 1.3.6 package from https://github.com/cakephp/cakephp/archives/1.3, and deployed it as is in a folder named as my domain.
Edit:
I have win-xp with wamp.
I created the app by simply unzipping the file to a folder and then renamed it to 'domain_name'.
Then I made the db connection and set the configuration files.
At that point I created the models, views and controllers.
Now the application is working, locally.
My question is: can I simply upload everything to my server, to the html root folder and say that "I am done"?
As long as your app isn't already in production, putting it online can tell you more about how it's working. For instance, you'll learn if there are missing modules or dependencies that must be installed on the live server.
If it's an already live system, you may want to use an online staging server to understand what needs to be modified on the production server in order to have a smooth deployment.
There are three ways that you can deploy your cake app (Development, Production and Advanced), and all of them are secure:
http://book.cakephp.org/view/912/Installation
I would recommended the Production install if you aren't going to run any other apps on this server.

Resources