I have to install Piwik (now Matomo) analytics tool in an AngularJS project. I am using windows and I have to do it in my local environment. I am an absolute noob in this backend stuff So, cannot figure out how to proceed.
The brief idea that I have got till now is that I'll have to use node.js with express.js to setup the local server. Also, I have to use mySQL along with it to store the data.
So, my question is that how can I do the same? Any relevant resources will be really helpful.
Related
I completed an online React course and deployed my application to Heroku. During development, I used the 'json-server' module found at https://github.com/typicode/json-server. This served up a folder on my computer which contained a simple json file and a few images for my website while conforming with the REST API. What do I need to do to get the server to operate independently of my machine so that my application can fetch the data ? I have zero experience doing this.
if you mean you want to create a server for your site,
first of all, you need to get a server, which can run nodejs , then you need to deploy and run your JSON server via a nodejs(express) app.
then you can connect to your server via your website/app
in order to do these things, you can follow tutorials
there are lots of tutorials about it.
hope you got the idea.
I'm currently trying to make a turn-based game for a class project using gameboard.io. My biggest issue is I don't know how to set up my folder structure with react and MongoDB as its a new technology I've been using.
I've tried a couple of different things but every time I try to use mongoDB I get loads of errors and files missing/not connecting and I'm sure my folder structure is broken.
Can anyone help me with an outline for a folder structure using those technologies? I know this isn't a typical question but I've been struggling with this. Any help would be appreciated, thank you.
Normally mongoDB runs on the back-end. Your front-end application would interact with mongo through an api. If you want to use a node.js powered back-end server application, express is a popular choice, but there are many others ( koa, hapi, Meteor, ...to name a few).
Then install mongoDB on (not the npm package but the server application, the npm package is the mongoDB driver that you use in your application to connect to the database, you will find instructions on mongoDB's website), I would also recommend installing mongoose, it's an object data modeling library.
If I where you, start with installing express, and work on communicating with express from your react app. Then install mongo/mongoose, and give it a try.
This question already has answers here:
How do I make a custom subdomain on Firebase?
(2 answers)
Closed 6 years ago.
I'm looking to build a single page application, preferably with angular on the client and firebase as the backend. As for the general data storage there are no need for advanced queries and no need for something like Mongodb along with the MEAN stack for example (which I'm most comfortable developing in otherwise). On the server side firebase has sufficient requirements for what we are looking to build. My question is and what seams to be very hard to find any information about is:
Is it possible to use **multiple domains with firebase running in the background with the same application and database for each and every domain?** (Possibly using node as a static file server alongside with it if firebase isn't enough to tackle this on its own). What I mean by this is that we want to be able to build the same system for our clients but on their separate domains.
The goal is to have a server side application running all the same backend-logic with multiple websites and with angular change the front-end components depending on what domain the user visits. (This has already been fixed and works properly with angular).
I'm not able to find any information about this other than using multiple applications with the same domain. This is not what I aim to do. And the firebase documentation isn't as much help either. The firebase hosting capabilities are the issue for me here and if anyone could point me in the right direction on where to get started it would be very much appreciated!
I've looked around for other alternatives when it comes to routing such as using vhost middlevare with the express framework or Nginx to setup some proxy of some sort but I recon that this shouldn't be necessary or at all possible to use with firebase. And I hope that there's maybe a more straigh-forward approach.
Here is an active issue on using a proxy with firebase:
(Active as of now: June 2016)
https://github.com/firebase/firebase-tools/issues/155
Thanks and I hope this is appropriate to ask in this forum, otherwise please do let me know where I can find more information about this.
I eventually found out what I had to do and it now works the way I need it to. Hopefully this can help if anyone is wondering the same thing in the future.
In the firebase console you can add authorized domains by going to:
https://console.firebase.google.com/project/THE_PROJECT_ID/authentication/providers
and adding the set of domains to your application. (Initially localhost and the firebase-app domain is set when creating the app)
and for test purposes setting the hosts in the GNU. (I'm using mac.)
sudo nano /private/etc/hosts
I'm now able to serve the same application on both: foo.com:5000 and bar.com:5001 just as I was looking to do from the beginning.
I'm very new to all this, so please bear with me. I just completed this tutorial on RPC in GWT. In the tutorial, you create a stockwatcher application that displays stock information. The application gets data from a server using RPC. I deployed the project to app engine and it works great.
Now I would like a separate, normal java project that runs on my computer and displays stocks that it retrieves from the app engine server using rpc. In the stockwatcher tutorial, there is a client and server package. I refactored the client package into a new project to start. I understand that I need to give it the appropriate url, but I'm not sure how to do that. The StockPriceService has the annotation #RemoteServiceRelativePath("stockPrices") so my first thought was to somehow change that to the correct app engine url. Is there an annotation that allows me to put in the entire url? If someone could point me in the direction of a tutorial that deals with this, I would greatly appreciate it.
THANK YOU!!! :)
Edit
I'm trying to make a client that will run on my computer, another client that will run on my phone, and a simple app engine server that will store some data. After doing the RPC tutorial, using RPCs seemed like a good way for me to send and receive data. I just don't know how to setup the RPC service across multiple projects.
Edit 2
I just saw this so I guess what I want to do isn't possible. I guess my new question is, what's the best way to send and receive data between app engine and a non-gwt project?
Pls see the following links
https://developers.google.com/appengine/docs/java/gettingstarted/
https://developers.google.com/web-toolkit/doc/1.6/tutorial/appengine
An appengine project will run your machine, you can really deploy it, but you need an account.
The application(JSF+hibernate) is been deployed using the vmc commands as on the cloudfoundry site. able to see the welcome page. postgreSQl service is binded with the application but the application is not able to connect with the database.
And also viewed about the VCAP_SERVICES using java but dont know much about it rather how to create it.
Cloud Foundry uses auto-reconfiguration if you have one service (either MySQL or Postgres) bind to your application. That means you don't need to touch your code at all!
Please review the following article on our docs site:
http://docs.cloudfoundry.com/frameworks/java/spring/spring.html#using-cloud-foundry-services-in-spring-applications
If you still have issues, go ahead and upload a war file of your app and we can take a look.