Modify an existing application to make it as a remote for a shell application using mfe with module federaation in angular - micro-frontend

I have an existing application, I want to make it a remote for a shell created with module federation. what chnages do I have to make in this app and the shell to accomodate this and will this work if they are not in same workspace
I tried creating web config files in remote and made changes in shell but it's not working

Related

How to develop foxx services using arangodb web interface

I am creating foxx services, right now I am doing it in VS Code and uploading the zip file in the services section with a mount point in DEVELOPMENT mode. Now I want to quick edit the foxx service in web interface itself. I was reading this possible but for some reason I do not get an option to edit it using web interface. Am I missing some configuration/setting or something.
One way to do rapid development with Foxx is to use an IDE that automatically uploads modified files to a local 'deployment' location.
For example, if you use WebStorm IDE, and edit the files in a directory that is integrated with GIT, then you can checkout and check in your code.
WebStorm (or other IDE's as well) have a feature where they monitor edited files, and then automatically copy those files to a destination location.
You can set it up so that it notices when you save a file, then rather than zip it and deploy it via the web UI, it just copies the files to the directory that Foxx is using as the source of your web service.
If you have the Foxx service running in 'Development' mode, then it recompiles every invocation, so it will pick up the newly edited changes that just got copied in.
You need to find the target directory that you have your Foxx Service running out of, when you enable Development mode it will tell you the path in the Web UI.
Not sure if you can do that with VSCode, but if you can then that's the easiest way to do it.

Setting environment variables when deploying MEAN Stack app to AWS EC2

I'm deploying a project that I've been working on to AWS for the first time and everything that I've read, regarding deploying a MEAN stack app to ec2, states that you install the project via git repo. However I have environment variables for different API keys and my database string that I placed in my .gitignore file so I'm facing the issue of trying to set those environment variables so that my web application runs correctly. Does anyone have any idea how to go about this?
An EC2 instance is an entire virtual system. When you create a new EC2 instance, you will need to connect to it, git clone your project, install any necessary dependencies (NodeJS, NPM, etc.) and then start your application with any environment variables that you like.
You will want to use a tool like scp to upload any non version controlled files, like your database string, or create them on the instance with a text editor (Vim, nano, etc.)
You can create a startup script that does this when the instance is created, however if you are deploying the project for the first time on a new machine, I don't think this is the way you will want to go.

Relative path for client hook script settings

I'm trying to create a client hook script for TortoiseSVN 1.8.11 on Windows 7.
What is givining me trouble is the path to the hook script in the settings (Settings->Hook Scripts).
Using the absolute path to my batch script works, but I need to use a path relative to the repository. The reason for this is that coworkers might have their repositories in different locations and the hook script should be used by everybody. Server side hooks are out of the question, since I can't modify the server.
I tried using environment variables, ^/my/path/hook.bat and ^^/my/path/hook.bat, no success.
Client-side hooks are local executables, not related in any way to your local Working Copy (not repository)
TortoiseSVN's configuration, performed using TortoiseSVN - Settings, not stored in WC|repository and also is pure local
If you want to have any client-side hooks avaliable and callable for everybody in team (with TortoiseSVN only), you have
Place these scripts into repository
Define all hooks as folder-properties in repository. Read about
tsvn:startcommithook
tsvn:precommithook
tsvn:postcommithook
tsvn:startupdatehook
tsvn:preupdatehook
tsvn:postupdatehook
properties and parameters and about using special wariables (%REPOROOT% and %REPOROOT+%) in script-path in TSVN help, part "4.17.2. TortoiseSVN Project Properties"

Storing securely passwords for connection to DB in opensource projects

Cloud9 is a cool service. IF you create a workspace that is public it will mean that everyone who knows your project url and have an account at cloud9 can browse and download your code. This means that if my project have, for example, connectivity to mongodb, everyone will see login and password to connect to mongo (because it will be in some source file).
The only option I can see to store passwords securely (except making project private) is to somehow add them to environment variables, and use process.env.XXXXXX call within the code. This seems to be secure because even if others may browse my code they cannot open terminal and check what environment variables I have defined.
So, is there a way to add my custom environment variable(s) to that they would be accessible via process.env.XXXXXX inside node's code?
You can define environment variables in ~/.profile. Files outside of the workspace directory /home/ubuntu/workspace are not accessible for read only users. You can do e.g.
$ echo "export SECRET=geheim" >> ~/.profile
to define the variable SECRET and then use it through process.env.SECRET from your application. The runners (from the "run" button) and the terminal will evaluate ~/.profile and make the environment variable available to your app.
When running project with cloud9 runners there is Environment popup on the right side of the runner toolbar. You can use it to add environment variables the way you want, but make sure to not add a name to the config since configs with name are automatically saved in .c9/project.settings
Another solution is to create a file in the directory not exposed in readOnly mode. e.g
echo "password" | sudo tee /xxx
you can even edit /xxx file using vi inside cloud9 terminal.
But Of course the best solution is to buy premium subscription, and get more private workspaces:)

How to deploy a data file on tomcat web server in linux debian OS

I have a web application developed using JSP and Servlet. This web application is deployed on server having Debian Linux as OS and The Tomcat version is 5.5.31. As this applications required some data files, These data files will be get created automatically when setting are done using a standalone java application. This application is deployed on another machine. This setup is done. As I dont know much about Debian Linux and where my application is goes on it so I have some doubts in deployment of these autimatically generated data files which are as follows
As I made the .war file of my web application and deployed it using Tomcat Manager. so I dont know where exactly my application goes. I dont know the exact path. How do I find it?
Is it possible to create FTP for this web application which is deployed on Debian Linux server? I think that if creating FTP is possible then I will directly connect to FTP using my Stand alone Java program and will easily do the creation of the file and other file and directory manipulation.
If you've deployed a war, the application isn't anywhere on the filesystem as such. Most servers will unpack the war somewhere, but you shouldn’t rely on where that is.
I can think of several options:
getServletContext().getAttribute("javax.servlet.context.tempdir") to get the application's temp directory, then inform you external program of this location and place the file somewhere in there in a know location.
Arrange for a "know location" outside of the application, such as /tmp/somewhere or /var/cache/your-app/somewhere to place such files. (Note: /tmp is usually cleaned on startup of a linux machine)
As for getting the file onto the server from a remote machine: You could get your client to upload the file directly to your webapp (something like Apache HTTPClient will help you there), which means that you could do without the "know location" above. If you want to do this outside of the application though, I'd avoid FTP (due to security). Instead, I'd go with scp (secure copy).
Edit: Reading between the lines a little, you mention "setting" in the data file. If this is a configuration file which is not changed once the app is running, you may find it more convenient to have a "deploy" step on your server which simply takes the settings file and adds it to the war before deploying it. This is easy enough with "ant war" for example. You could then access the file using getClass().getResourceStream(..) or such.

Resources