My generate files from lb4 openapi cli command doesn't find models folder - loopbackjs

My OpenAPI api json files are in ./reference and refer to models in the ./reference/models folder - so when I attempt to generate controllers/models from the API files, it says it can't find the ./models (not ./reference/models) folder. Is there a way to set the working directory when running the lb4 cli command? ... or do I have to restructure my files in the root folder?

Hello from the LoopBack team 👋
This looks like a bug in our code generator. Can you please create a small app reproducing the problem and open a GitHub issue per our Bug reporting guide?

Related

Django deployment tool

I am looking for ready made deployment tool for django. Looking for tools like following which uses config files value to make deployment.
Meteor-up for deployment of meteor.js project.
python-lambda for department of python code to AWS lambda.
I have created dockdj python tool, given that I didn't find the deployment tool like Meteor-up for Django.
Please find the link to the dockdj here: https://github.com/pavanputhra/dockdj

How to use Weasyprint with AWS Lambda? (Django & Zappa)

I have a simple Django app which has been pushed to AWS Lambda using Zappa.
This process has worked properly, with one exception : cannot load library 'pango-1.0': pango-1.0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'pango-1.0'
I'm using Weasyprint to generate PDF files. Weasyprint needs Cairo and Pango.
I don't know how to get Pango to work on my AWS Lambda install.
What should I do to make it work ?
So, after asking around in multiple locations, I found out that I needed the static versions of all the libraries required by Weasyprint, and that I needed to push these in my zappa package.
Luckily, a github user has uploaded a working repo of the static requirements : https://github.com/Prasengupta/weasyprint_for_awslambda
So all I had to do was download it and extract all the folders at the root of my django app (the folders must be at the same level as the zappa_settings.json file).
I then just had to do a zappa update command to upload all these files to my AWS Lambda install, and it worked!
My Django app is now full of weird directories, but at least the whole thing works.

How to deploy files for Sitecore using TDS

I'm starting a new Sitecore 9 project using Helix and TDS. I've got my basic structure setup, using Hedgehog's fork of the Habitat site as a guide. I'm also referencing Hedgehog's docs.
My solution is just a start, so it's very simple right now, only a Foundation.Serialization module that contains the TDS projects for the basic layer folders and a Project.Website module that contains a TDS project and an MVC Website project (MVC)....it's got a basic Razor view and some random CSS/JS files.
The TDS Habitat readme, says to use Solution > Deploy Solution to deploy the projects. When I do this on my project it builds and the Sitecore items are deployed to Sitecore, but my Views and CSS/JS are not....presumably because I haven't configured anything to facilitate this.
Looking at the docs and the TDS Habitat solution, it's not clear to me how to configure TDS to know anything about how to deploy files. I'm finding info on the web that says that TDS will deploy files, transform configs, etc but with no examples of how to actually make that happen.
How do I set things up so Deploy Solution will also deploy files from all of the web projects in a solution to my local web root?
First, you will need to make sure the Sitecore Deploy Folder is set. From the documentation:
Sitecore Deploy Folder – Contains the path to the ROOT of the Sitecore
instance on the file system. This setting is used to install the TDS
Classic service when needed and to deploy the compiled code when the
TDS Classic project is built.
You also need to make sure that file deployment has not been disabled:
Disable File Deployment – Stops TDS Classic deploying files to the
directory specified in the Sitecore Deploy Folder.
If you are still not seeing the files being deployed, you will need to check if the process has access to the deploy folder.
You can also deploy files as a .update package and then use another automated tool to deploy the .update package to the target environment.
I figured out the issue. On the properties page for a TDS project there is a field where you indicate which projects should be built and deployed along with the sitecore items:
https://www.hhogdev.com/help/tds/propgeneral

Deploying CAR files like RPM

I am working with WSO2 ESB and I would like to build my .car project like RPM to deploy on Redhat servers.
I have several .car project and I have to manage dependencies between them. I have thought that it is a good idea to do it.
Has anybody tired this before? Where can I find more information about this? Should I use hot-deploys putting .car file into /repository/deployment/server/carbonapps directory?
Thanks in advance.
You can use hot deploy putting .car files into carbonapps, but take care of downloading them on the ESB local filesystem before moving them to carbonapps so that the ESB don't start deploying them before the end of the download.
You can develop your own script and rely on a config file defining dependencies so that your numerous .car are deployed in the right order
You can use maven and plugin org.wso2.maven:maven-car-plugin that offers you a way to package and deploy your .car from a remote host with something like mvn clean deploy -Dhost=esbhostname -Dport=9443
Hope it gives you some ideas to achieve your need...

How can extend the ember-cli build?

I want to have some custom steps run during them ember cli build, is there a supported way to do that? Specifically, I want to parse comments in css files and build write files to the public directory based on those comments.
You should create an ember-cli addon to create extra build steps. There is some good documentation around on Google, but here is a blog post I used to create addons. This guide is more tailored toward creating ember components but there are other ember-cli hooks you could use to run code during the build process.
Perhaps you could use the included hook to run some code to read your css files and then import your files into the public directory. Other hooks that you could use are documented here
Alternatively, if there is a broccoli plugin that does what you want, you simply need to add it to your package.json and run npm install. Now the plugin has been added to the build system.