Using Nodejs, Ejsexcel, Express, Vuejs to write a tool for Excel to JSON--first step: Create a Vuejs project with Webpack

Source: Internet
Author: User

Recently developed a H5 game, need an Excel to JSON tool, looked for online, did not find the right tool. Think of their own before with Nodejs, Express and Vuejs did a website, also used Ejsexcel plug-in, so I did a hands-on. Here is a simple record of the development process, to save yourself a souvenir.

This is the first blog in this series, starting with the new project.

1. Need to follow Nodejs and Vuejs

Installation of the method is not mentioned here, online looking for a lot of tutorials.

It's installed. You can look at the version numbers of Nodejs, Vuejs, and Express:

2. Use Vuejs to create a project with Webpack

Create command: Vue init webpack Developer_tools

The new process needs to fill in the author name, unit test and some configuration, on-demand selection is OK, this is what I created:

3. It is important to enter the project path and use the NPM install project dependencies

I'm used to using the shorthand command NPM i to install dependencies

Command: NPM I

The installation process will take several minutes. The installation is as follows:

4. Compiling the project using the NPM Run Build command

The compilation results are as follows:

5. Run the project using the NPM Run Start command

To run the command:

This will automatically open the Run Web page with the following content:

7. Generating a backend service framework using the Express generator generator

(1) Use command: Express Server introduces Express

After the execution:

(2) Enter the generated server directory and use the NPM I command to install Express dependencies

(3) To run Express and then access the 3000 port on this machine, you can see the Express page:

Run Express:

With a browser access to http://localhost:3000/#/, you can see the Express run page:

8. Installing the Ejsexcel module

Previously used Ejsexcel plugin, the function is very powerful. This is its Hithub address: https://github.com/sail-sail/ejsExcel

Install to the development directory, install the command: NPM i ejsexcel

Here, the entire project is created.

Using Nodejs, Ejsexcel, Express, Vuejs to write a tool for Excel to JSON--first step: Create a Vuejs project with Webpack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.