Using the Gitlab API I can retrieve a single project by it's path.
Once I moved a project Gitab is so nice, to redirect users accessing the old URL to new projects and tell them to change their bookmarks:
Unfortunately trying to access the old path via the API simply fails.
Is there a way to extract the new project path if I only got the old path using the Gitlab API?
Background is that we have some tooling that extracts the projects path from the git remote host and performs some actions.
After moving some projects we would like to perform some update actions using the tooling.
Related
I want to have dynamic configuration for my Next.js project.
I want to be able to change it after Next.js is built and deployed.
Right now I'm using .env and .env.production which are part of dotenv repo. But it seems that Next.js or dotenv compile the content and there is no way to change them dynamically.
How can I do that?
You can't change .env after building and deploying. But a workaround is always there.
Put a JSON file separated from the project and host in the server. Read the JSON file from that server and use that variable in the configuration. But there is a security issue if you put secrets and credentials in that JSON. for that, you can write a simple node project with returning JSON configuration using API. Use a token key to access that API. Put this token secret in that node project. So, changing those variables in that node or JSON project will be more cost-effective than rebuilding and deploying again the whole project.
or simply put those configuration in database.
I have created a project using Qt and I found the Repogen tool that cames with Qt.
In the official documentation says that I must host the repo in a server in order to receive updates or create an online installer. I tried using GitHub as a hosting but maintenance tool doesn't recognize it.
I added he repository url in the settings window of the maintenance tool pointing to the base repo path and then pointing directly to Updates.xml but the same error.
What kind of web server must I use to deliver the release files?
I resolve this issue, by creating a file service in Flask and using a free hosting to deliver files.
Seems like hosting in GitHub is not useful in that case.
I am currently using angular to issue API call to an API server running ASP.NET. However, I have a cross-origin issue as for angular development, I am using localhost. While in the production version they will all run under the same domain using IIS.
Is there a way to run the angular app on the same port with ASP.NET?
P.S.: I am also open for other alternatives on solving this issue.
I've encountered the same problem, then I've found this post on medium, hope this works for you.
Edit:
Actually the solution that I've used is from that article.
The idea is that you can't "publish" the API and the Angular app on the same port, but you can use a proxy to connect from the Angular app to the API on the other port.
Update: sorry for not answering this long time ago.
To deal with the cors issue (in this case) you can use a proxy with the ng serve command.
For example, in my case I have used a proxy.conf.json file like this:
{
"/api/*": {
"target": "http://localhost:3000",
"secure": false,
"pathRewrite": {"^/api" : ""}
}
}
This code rewrite the url on every request to /api/* to the http://localhost:3000 where your api is listening.
So, to illustrate, if in angular you make a request like http://localhost:4200/api/users it will be redirected/rewrited to http://localhost:3000/api/users solving the cors issue.
Now, the way you have to run your angular application is different.
ng serve --proxy-config proxy.conf.json
I was able to achieve that with IIS successfully! I know the post is old but hopefully, it will save time for solution seekers :)
First (just a reminder) ensure that you have .NET Core Hosting Bundle installed on IIS machine (link could be found here). Bear in mind that it will require at least WinSrvr2012R2 to run.
Now copy published .net core API solution folder to the server. The same for Angular - next reminder here: execute ng build --prod then copy dist folder to the server.
Then configure IIS - create a new web site that points to the Angular app folder. Your Angular app should run at this point (but obviously there is no API yet).
Go to application pools - you will see the pool created for your application. Open basic settings and change CLR version to 'No managed code'.
And finally, click on your Web Site and 'Add application' under it. Point to dotnet core API folder and name it using some short alias. Now you should have a website structure with the application included.
If your angular app URL is:
https://myiissrvr/
your API is under:
https://myiissrvr/[ALIAS]/
DONE
Final remarks:
Usually, web API using URL structure like
https://myiissrvr/api/[controller]/[action]
So after bundling it together, it will look like:
https://myiissrvr/[ALIAS]/api/[controller]/[action]
With that approach, you should be able to attach multiple web API services under statically served Angular website - each one under its own alias. Potentially it might be useful in many scenarios.
For a long time I have been performing dated deploys to our IIS servers, basically this means that each deploy gets its own dated folder within the web site folder (c:\sites\my-site\20140824-1236 for example). I then redirect the web app to the new deployment folder.
This gives us a quick role back capability if things go pear shaped.
The problem is that we are looking at moving deployment over to the new web deploy techniques, while we have been using the new techniques within QA and UAT for a while - the standard behaviour is to simply replace the files at the location defined within the IIS web site.
Before I go and start looking at remote PowerShell to re-configure IIS before executing the web deploy.. does anyone know how I can achieve this using standard web deploy.. maybe with msbuild extensions or something?
How about using the automatic backup capabilities in Web Deploy v3?
http://www.iis.net/learn/publish/using-web-deploy/web-deploy-automatic-backups
i have an project with name called(dbservice layer) which is in path: d:\webservice\DBService. here i have an webservice which connects to DB and returns an object of an class.
once i added an reference here i get an url:http://localhost:2371/Jobs.svc
now i have another project name (UILayer) whic is in path: E:\School\UILayer
i added an service reference here with url as http://localhost:2371/Jobs.svc
but i get an messgae telling service is unable why is that happening.
if both my webserivce layer and ui layer are in same project. then i able to use the webserive in the ui layer. and get the required output
so i wanted to know is there any way we can acesss the webserive from one project to another project
thanks in advance
prince
Publish your web service to an actual location and then add a reference using the actual URL not the one served up by visual studio. What I think is happening is each Visual Studio instance is using a different port so you can't say localhost:2371 for both projects because that is the local port for the instance your running with your original project.
Publish it and then access it via http://localhost/jobs.svc. You should be able to access it via IE directly without running Visual Studio if you have published it correctly.
The main point is, you have the wrong URL.