Node.js support for Exporting excel and Database - javascript

I am new to node.js.
I am currently in a pre-development phase of an application.
The application will be for tracking status of task of employee. The admin will have the right to export excel which will have data of employes for a given date range
Currently I am thinking WCF Service and SQL Server for the backend.
Few days back, someone told me about node.js and it's capabilities. And yes I was impressed
I wanted to know if I write a service with node.js, how will the service be hosted, also if I can write code for exporting data in excel, and lastly which database providers/adapters does node.js support?
Apologies if there is typo or this question need to be asked in any other community of stackExchange.
Thanks in advance

This is a great and simple plugin for Node to export Excel (xlsx).
https://npmjs.org/package/excel-export
As for the database, I'd recommend using MongoDB as it stores JSON. It's a bit getting used to, but you'll like the concept of documents and it's query capabilities. If you do get into it, here's a shortcut (took me a long time to wrap my head around this):
MongoExplorer (Silverlight MongoDB Manager):
http://mongoexplorer.com
*took me a long time to understand the connections of DBs, collections and then documents. Mongo Explorer really helped.

Related

What is the best way to integrate/call a MySQL database into a front-end web application?

I am designing and building a MySQL relational database on a local server and also building a front-end using HTML/CSS/Javascript. I need a way to connect these two (they'll be on the same server), and call and display tables from the MySQL database onto the front-end web-app.
Can javascript do this? I've looked up a few answers on here and it seems like about 5 years ago the answer was no. What is the best way to do this?
The best way to do this is creating an HTTP interface to your MySQL database.
If you are comfortable using Javascript, you can make one with Nodejs, using, for example Expressjs and Sequelize
You can find very good tutorials on the web. This one for example
You'll always need a server to connect your database to a front-end application. There are some SaaS products that simplify the relationship between the server and DB like Firebase: https://firebase.google.com/docs/database
If you want to use MySQL, you'll need a server to provide an API: popular interfaces are REST, SOAP, or GQL.
If you want to write your server with Javascript, Express is a very common and approachable solution: https://expressjs.com/

Store data on server without Database

I’m webGL engine developer (ThreeJS) in small company. We have some events in few weeks and my boss just told me that i have to make registration form as soon as possible, also one page should show names, lastnames and company of all registered members. Problem is that i’m very bad in databases and i have really small amount of time to re-learn it. How can i store registration data on Server without Database? I looked up on web and most instructions are unclear(because i’ve not worked on database before) and others are using localstorage (as far as i know its used for cacheing data)
What you're looking for is a flat file database system, try taffyDB it basically use Json to store its data or Papa parse that uses CSV files, you can easily edit with excel for example.
If you're really good with javascript you can consider using a real database after all,mongodb is a bit advance but still not as complicated as mysql or even sqlite.

Ember.js + Ember Data + PostgreSQL

I'm having trouble understanding how to connect Ember.js with PostgreSQL using Ember Data adapter.
My main problem is finding a complete example where I can study how I would do this.
I know I have to create a jsonapi to provide the data. My goal is using Node.js to provide the data.
I've found this project here and I see that it has a relational db store.
Anyone knows where I can find a complete example of a project using Ember with a PostgreSQL jsonapi server implemented in Node.js?
Preferably a simple project where I can understand the basics of getting a connection running and show the data in Ember.
Any help appreciated. :)
I've written a boilerplate node app and a boilerplate ember app that are designed to work together as a frontend/backend app. They aren't especially simple, but if you explore them you might be able to gain some good insight into how these two frameworks can connect.
For example, in the users controller, the show method maps to /users/:id, and then responds with a custom JSON payload conforming to JSON API spec. Although it hasn't been implemented yet, in Ember simply having this.store.findRecord('user', 1) will automatically send a request to /users/1.
You can explore the config files to look at the postgres connection (I implemented using bookshelf and knex).
Hope that helps!
You actually have two questions here. You first need to choose how nodejs communicates with your ember-data. This is a possible approach. It also provides a connector to your database.
Secondly, you need to define how nodejs communicates with the db. Here is a list of possible packages that might fit your needs.

Is Node.js suitable for my project given how I'm using it?

I'm about to start writing an application and I want to include newer technologies to improve my knowledge and gain a skill set.
I'm using mysql to store user data (no choice), Angular.js to display/template content on the dom, and I wanted to use node.js to return results from the database in json format to be used by Angular.js.
My assumption was I could use node.js (along with the node-mysql module and maybe express)to accomplish my database queries that feed into my Angular.js templates.
Additionally, the application will live on a different server than the database itself and may reside in a mobile framework.
Am I way off base when it come to how to use node.js? Am I just using the wrong tool? Am I on the right track?
Any help, explanation, and points in the right direction would be great. Most of the info I've seen are copy/paste from the node.js site/wiki and don't really answer my question.
This is largely an opinion-based question and likely to be closed, but you're not way off base. What you want to do is absolutely (and commonly) done using Node.js.
As a complete aside, you might like to check out Platform-as-a-Service providers such as Heroku.com and Nodejitsu.com; both offer great and easy Node.js hosting and addons (such as NoSQL and RDBMS data stores) which have free tiers.
For that matter, MongoLab and MongoHQ both offer free tiers independent of Heroku, which you could use from your MySQL-only hosting provider if you like.

How to porting java apps with postgresql to parse platform

I'm new in parse platform. My old apps used java apps with postgresql as database. Now i want to migrate it with parse platform.
Please explain me how to do that?
Thank you...
Depending on the complexity of your data model, a dump/import may not be a good option. If your model is simple, an import may work ok. But bear in mind that you are moving from a SQL database to a NoSQL based service. If you have join tables etc in your PostgreSQL db, these are not the way to go with Parse. The query paradigm is different.
Moving from SQL to NoSQL is mostly not about export and import, but planning your data model for NoSQL. Your best option is to plan out your new model (after reading up on NoSQL), and then create a script that will pull data from your old database and push it to your new. Unless your database is simple, this operation should not be taken ligthly.
If your app becomes very popular, the effort you put in now could be what makes or breaks your service later on.

Categories

Resources